small medium large xlarge

26 Sep 2008, 20:29
Dave Mingos (1 post)

I’m using Rails 2.1.1 and have made it through up to this point with no errors/inconsistencies with the book. However the new user form blows up when it gets to the @:password@ symbol. If I change it to @:encrypted_password@ and remove the @:password_confirmation@ field, everything works fine.

Any clues why this isn’t working? …how to make it work?

28 Sep 2008, 17:46
Derek DeVries (18 posts)


At the bottom of p. 167 we mention that the @:password_confirmation@ field is a special attribute that works with the @User@ validation that we add later on. On the top of p. 171 we add @attr_accessor :password@ to the @User@ class. This adds the @password@ attribute to the class so that it will work with the form. If you update your @User@ class to use this attribute, your form should start working again.