Displaying 2 results from an estimated 2 matches for "sanitize_for_mass_assign".
2012 Apr 13
0
Scoped attr_accessible not working?
...<http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html>for this.
I''m on Rails3.2.3/Ruby1.9.3 and trying to use that technique in the
controller as described. It is supposed to dynamically restrict the
attributes that can be mass assigned. However, sanitize_for_mass_assignment
is ignoring the scope and using the default attr_accessible instead.
Is anyone else seeing this problem? Or has anyone successfully implemented
it the way the docs describe? Seems like it''s not working as advertised.
--
You received this message because you are subscribed to the G...
2011 Nov 07
2
Problem with Rails3.1.1 in mass_assignment_authorizer
...(ArgumentError)
/home/byrnejb/.rvm/gems/ruby-1.8.7-p352/gems/activemodel-3.1.1/
lib/active_model/mass_assignment_security.rb:209:in
`mass_assignment_authorizer''
/home/byrnejb/.rvm/gems/ruby-1.8.7-p352/gems/activemodel-3.1.1/
lib/active_model/mass_assignment_security.rb:209:in
`sanitize_for_mass_assignment''
/home/byrnejb/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-3.1.1/
lib/active_record/base.rb:1744:in `assign_attributes''
/home/byrnejb/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-3.1.1/
lib/active_record/base.rb:1567:in `initialize''
/home/byrnejb/.rvm...