what should the create action be? i tried @school = current_user.build_school(school_params)
On Saturday, January 2, 2016 at 4:45:20 PM UTC-5, Colin Law wrote: > > On 2 January 2016 at 20:51, fugee ohu <fuge...@gmail.com <javascript:>> > wrote: > > def create > > @school = current_user.build_school(school_params) > > > > causes the above error my models are users has_one profile, profile > has_many > > schools, profile belongs_to user, school belongs_to profile > > What makes you think that current_user.build_school is valid code? > > Colin > -- 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 post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/eece6790-33af-45fb-b5ad-30d168e12843%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.