There is a lot of resources on SO about issues on Nested attributes in Rails 4 regarding strong parameters but I don\'t find any solution on this: (so sorry if it\'s a duplicate
Try Adding the :member_id
inside profile_attributes
which is in member_params
so it will look like this:
def member_params
params[:member].permit(:email, profile_attributes: [:first_name, :last_name, :member_id ])
end
Ok get it..
I think this is caused by simple_form:
= simple_form_for [:admin, @member] do |f|
= f.simple_fields_for :profile, @member.profile do |pf|
= pf.input :first_name
= pf.input :last_name
= f.input :email
= f.button :submit