Adding New Admins to Active Admin

alik picture alik · Sep 29, 2011 · Viewed 33.6k times · Source

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 [email protected], 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.

Answer

Scott picture Scott · Sep 30, 2011

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

AdminUser.create!(:email => '[email protected]', :password => 'password', :password_confirmation => 'password')