Ruby and Rails

Ruby と Ruby on Rails のこと

Devise に初期ユーザを追加

db/seeds.rb に下記を書く。

User.create(email: 'admin@example.com',   password: 'password')
User.create(email: 'manager@example.com', password: 'password')
User.create(email: 'user@example.com',    password: 'password')

下記で登録できる。

$ rake db:seed