why every time that i retrieve an existent User and try to update its email, ruby throws an exception claiming for its password.
anyone got the same issue?
UserModel
attr_accessible :nome, :sobrenome, :email, :email_confirmation, :password, :password_confirmation, :genero,
:endereco, :numero, :bairro, :complemento, :cidade, :estado, :cep
has_secure_password
before_create {generate_token(:auth_token)}
attr_accessor :password
email_regex = /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
validates_presence_of :nome, :sobrenome, :genero, :email, :password, :on => :create
validates :email, :format => {:with => email_regex},
:uniqueness => {:case_sensitive => false }
validates :password, :length => {:within=> 6..60},
:confirmation => true
validates :email, :confirmation => true,
:on => :update
Here it is how i handled this problem.