0
votes

Every time i reset & seed my database it wipes out the standard [email protected] login for Active Admin.

In my seed file i set a user as having role :admin but this login only works for the frontend of the app and not the backend active admin login. How can i remedy this? Thanks!

Note* Im using Devise + cancan + rolify

Seeds.rb

user2 = User.create! :name => 'Second User', :email => '[email protected]', :password => 'please', :password_confirmation => 'please', :confirmed_at => Time.now.utc
puts 'New user created: ' << user2.name
user.add_role :admin
1

1 Answers

6
votes

Active Admin generally has another table for users known as admin_users. Please try the following in your console

user = AdminUser.create :email => '[email protected]', :password => 'please'