Displaying 1 result from an estimated 1 matches for "without_protect".
2012 Mar 30
1
cancan breaks scoped mass assignment
...roblems with the new scoped mass assignment features of rails 3.2
.
Basically, in my User model I create some attr_accessible attributes in
order to avoid users to edit their roles or other sensitive information.
From the administration I allow admins to edit those protected
attributes by passing :without_protection => true on creation and update
of new users.
This works just fine, but adding cancan load_and_authorize_resource to
my controller triggers a "Can''t mass-assign protected attributes:
...stuff..." . This happens also when using something like
User.new(params[:user], :role =&...