Register a Devise "User" through Seeds.Rb

Asked

Viewed 297 times

2

I’m finishing a project and want to create a default user. The entire user registration structure is carried out by the Developer embedded in rails_admin.

Through search I found this syntax below however it does not work:

User.create(:email => '[email protected]', :password => 'senha', :password_confirmation => 'senha')

1 answer

2


You have to rotate the command:

rake db:seed

on the console.

  • It worked @ygorbr?

  • Thank you. That’s exactly what we needed.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.