We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
bin/rails g migration create_users
class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string :username t.string :name t.string :password_digest t.timestamps end end end
class User < ActiveRecord::Base has_secure_password end
Add a validation to make sure the password is at least 8 characters.
class User < ActiveRecord::Base has_secure_password validates :password, length: { minimum: 8 } end
users
Migrate the database to create the new table.
bin/rake db:migrate