On Monday, February 17, 2020 at 12:38:03 AM UTC-5, Walter Lee Davis wrote:
>
> You may use fields_for for any object that you have declared 
> "accepts_nested_attributes_for" in your form's parent model. It obviously 
> makes the most sense to do this with a related object. 
>
> Walter 
>
> > On Feb 16, 2020, at 10:41 PM, fugee ohu <fuge...@gmail.com <javascript:>> 
> wrote:
> > 
> > Can I use fields_for for any models or do they have to be associated? 
> > 
> > -- 
> > 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 rubyonra...@googlegroups.com <javascript:>. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/09881329-3137-4c90-94a1-6495bccc90bd%40googlegroups.com.
>  
>
>
>
If you use accepts_nested_attributes_for in a model without an association 
rails will raise an error In my models users have many artists, artists 
have many tour_dates and tour_dates have many user_venues I need to add 
fields for user_venues to the tour_dates form Pretty confused what to do

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/f0c2006c-4cdc-4994-8e15-53fa34cb7a39%40googlegroups.com.

Reply via email to