Post Meta

Bookmarks

  • Delicious
  • Digg
  • Reddit
  • Magnolia
  • Newsvine
  • Furl
  • Facebook
  • Technorati

There is some default behavior with password fields.

In your model you’ll have to define the following fields:

1
2
t.column :crypted_password,          :string, :limit  =>  40
t.column :salt,                      :string, :limit  =>  40

In your controller you’ll have to handle them, as a single text field called password.

In your view, when update or create, you should add another text field called password_confirmation.

1
2
3
 
<%= f.text_field :password %>;
<%= f.text_field :password_confirmation %>;


Related posts

  • No Related Post

Leave A Comment

+ -