问题
Continuing from here: Rails - Form problems, everytime I try to create a new group_membership
I get this: WARNING: Can't mass-assign protected attributes: group, member
at my log and the ID's are added blank.
Have been making changes to the attr_accessible
of my models but so far no solution.
Thanks in advance.
回答1:
Make sure you add :group
and :member
to your attr_accessible
call :)
来源:https://stackoverflow.com/questions/6062971/rails-warning-cant-mass-assign-protected-attributes