ruby-on-railsdeviseruby-on-rails-3.1activeadmin

Adding New Admins to Active Admin


I am using devise for my users. I recently installed the rails Active Admin gem, everything is working beautifully.

However I can't figure out how to add a new admin users. I can see that active admin created an admin_user table in the db with a user admin@example.com, which I use to log in to the interface.

I tried adding admin_user as a resource so that I can just click the Add Admin User button within the active admin interface to add a new user, however that does not seem to work.


Solution

  • What brian said works perfectly http://net.tutsplus.com/tutorials/ruby/create-beautiful-administration-interfaces-with-active-admin/

    AdminUser.create!(:email => 'admin@example.com', :password => 'password', :password_confirmation => 'password')