Ruby on Rails Monday, December 30, 2013

On Monday, December 30, 2013 9:11:16 PM UTC, Ruby-Forum.com User wrote:

>
> >
>
> > You need to add the attributes that are allowed for user_profile.
>
>
>
>
> in fact i want to add all attributes of user_profile. for testing
>
> purpose I added firstname & lastname like this
>
> def user_params
>
> params.require(:user).permit(:email, :password,
>
> :user_profile_attributes => [:firstname, :lastname])
>
> end
>
>
>
> but still not working.
>
> user_profile is in unpermitted parameter.
>
>

There shouldn't really be any parameters of that name. It's not clear what changes you made after I suggested accepts_nested_attributes. In particular how you call fields_for in the view is very relevant.

Fred

>
> Unpermitted parameters: password_confirmation, user_profile
>
>
>
> Thanks,
>
>
>
> --
>
> 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/480e6d42-5fa8-44c7-b778-14c44419ff16%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment