Ruby on Rails Monday, December 30, 2013

Frederick Cheung wrote in post #1131871:
> On Monday, December 30, 2013 5:12:27 PM UTC, Ruby-Forum.com User wrote:
>> Colin Law wrote in post #1131851:
>
>> > inserting puts statements into your code, so if you insert
>>
>> def user_params
>>
>> params.require(:user).permit(:email, :password,
>>
>> :user_profile_attributes =>[])
>>
>> end
>>
>
> You need to add the attributes that are allowed for user_profile.
>
> Fred

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.

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/9929063167b384aa868668b234b4d099%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment