RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: Evan-M
I believe the ActiveModel::MassAssignmentSecurity module was changed for the release of Rails 3.1.
Now you can do this (in a non-ActiveRecord class):
include ActiveModel::MassAssignmentSecurity attr_accessible :first_name, :last_name attr_accessible :first_name, :last_name, :plan_id, :as => :admin
http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity.html http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html
I believe the ActiveModel::MassAssignmentSecurity module was changed for the release of Rails 3.1.
Now you can do this (in a non-ActiveRecord class):
http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity.html
http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html