I am trying to implement a user authentication system inside the rail, this is my model:
class users & lt; ActiveRecord :: Base attr_accessible: id,: email ,: name ,: password, made_it ,: updated_at has_secure_password before_save {email.downcase! } Valid: Email, Attendance: True ,: Specification = & gt; {: Case_senstive = & gt; Running in the console I can successfully read the user table, then when I try to make a record: User.new (: name = & gt; "A" ,: Email = & Gt; "a @ aa" ,: password = & gt; "password") is running valid back to it true < / Code>, but when I save the record I get an error: Users can not tap. password Removing hash works fine. What's the problem?
Thanks
You : password_confirmation ? You need this from the example given in Docs.
No comments:
Post a Comment