Too many nested associations?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Too many nested associations?

fugee ohu
i have user has_many press_releases and also user has_many artists and also artists have_many tours and also artists have_many press_releases Now I wanna create a tour and then a press_release for the tour The tour is made up of tour_dates, just in case you're wondering Complicating things is that user has_many press_releases as: :poster so that means all models in the chain of has_many_through need to include poster_type and poster_id I'm not sure where to use associations I'm tempted to bypass them and just use PressRelease.create(... or PressRelease.find_or_create_by(... in a controller regardless of the associations Should I use nested forms all the way to create press_releases or the direct Model.create method

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7ffe6c8f-0346-4424-9ecd-5d52fa298185%40googlegroups.com.