Ruby on Rails Tuesday, May 27, 2014

Hi Colin,

Thanks so much for your reply. I did complete the Hartl tutorial, but
it's when I tried to incorporate these nested attributes (which the
tutorial does not include) that I started to have problems.

Looking through the log, I see that the post request includes

Unpermitted parameters: user_details_attributes

I suspect that I have to put that user_params in the user controller. I
also know, form the log, that user_details_attributes is a hash. My
guess to make the entries in the hash save to the user, I have to edit
the create action in the user controller to somehow iterate over the
user_details_attributes hash and save each user_detail individually.
Does that sound like I'm on the right track?

--
Posted via http://www.ruby-forum.com/.

--
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+unsubscribe@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/fb5166b7463e571d24266435451042b4%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment