By accident I had Rails-3.1.1 installed by bundler. However, when I
discovered this mishap during my feature run I encountered this error
in many places:
wrong number of arguments (1 for 0) (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/gems/ruby-1.8.7-p352/gems/activerecord-3.1.1/
lib/active_record/reflection.rb:190:in `new’
Everything was working on Friday last with Rails-3.0.9 and no changes
to the code or the features have been made. I am therefore somewhat
curious as to what might be causing this. I previously had mass
assignment turned off in an initializer:
$ cat config/initializers/attr_accessible_nil.rb
#ActiveRecord::Base.send(:attr_accessible, nil)
So, I am wondering if this might be the cause of the problem. Note
that I have no intention of moving to Rails-3.1.1 at the moment. I am
just curious as to what would be causing this error.