Rails Tutorial 3 attribue unknown

I to the part of the tutorial where a User model is created. It has the following attributes: # id :integer(4) not null, primary key # name :string(255) # email :string(255) # created_at :datetime not null # updated_at :datetime not null # password_digest :string(255)

I simply add in model: attr_accessible ... :password, :password_confirmation, ...

it work but it can not absolutely truly

Be aware that, it is not safe to set passwords changeable via mass-assignment.

Rodrigo Vieira wrote in post #1059872:

Be aware that, it is not safe to set passwords changeable via mass-assignment.

Your decision, please? How it to solve?

Have you tried using Rails builtin confirmation mechanism?

This example doesn't work without 'attr_accessable: ... , :password, :password_confirmation ...' and with 'has_secure_password'

How to set the record field comming from form field?

In users table their is wrong field name i.e password_digest,it should be only password not password_digest

vishal singh wrote in post #1060022:

In users table their is wrong field name i.e password_digest,it should be only password not password_digest

Someone mentioned 'password_digest'? Only 'password' and 'password_confirmation'.