So far, it\’s RoR

Ruby on Rails, PostgreSQL, SVN, etc….

Archive for December 22nd, 2007

User profiles with restful_authentication

Posted by Chirag Patel on December 22, 2007


Error when updating the user from a form

ActiveRecord::RecordInvalid (Validation failed: Password confirmation can’t be blank, Password is too short (minimum is 4 characters), Password can’t be blank):





It’s probably because of the restrictions on the User model (attr_accessible or attr_protected, in particular). But allowing users access to any part of the User model via mass assignment is dangerous. That’s why many people create a separate Profile model and link it via a 1:1 (belongs_to, has_one) relationship.




Coming soon




Posted in Ruby on Rails | 2 Comments »