-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
Maybe it's just me but I've been trying to set attr_accessible in my model to stop mass assignment on crypted_password, and salt and it is not stopping mass assignment. Can anyone else confirm this? I'm on Rails 3.2.3 with ruby 1.9.3p125.
class User include Mongoid::Document field :email, :type => String field :crypted_password, :type => String field :salt, :type => String field :first_name, :type => String field :last_name, :type => String authenticates_with_sorcery! attr_accessible :email, :password, :password_confirmation, :first_name, :last_name validates_length_of :password, :minimum => 5, :message => "password must be at least 5 characters long", :if => :password validates_confirmation_of :password, :message => "should match confirmation", :if => :password validates_presence_of :password, :on => :create validates_presence_of :email validates_uniqueness_of :email end