Please replace these values with your own
u = User.new
u.role = :root
u.email = '[email protected]'
u.password = 'foobar123'
u.password_confirmation = 'foobar123'
u.first_name = 'Alexandria'
u.last_name = 'Asternova'
u.save
Now you can log in at http://admin.lvh.me:3000/users/sign_in
You can also do it all in one line if you would like:
u = User.new role: :root, email: '[email protected]', password: 'foo', password_confirmation: 'foo', first_name: 'screaming', last_name: 'constantly'
And of course remember to:
u.save