How do you change ActiveAdmin password?
Solution 1
Ended up using an answer from the ActiveAdmin wiki:
https://github.com/gregbell/active_admin/wiki/Your-First-Admin-Resource%3A-AdminUser
Solution 2
Best way to do this would be to change it from the rails console :
admin = AdminUser.find_by_email("[email protected]")
admin.password = "newPassword"
admin.save
Solution 3
When you install ActiveAdmin using the generator, you'll find a migration called {timestamp}_devise_create_admin_users.rb
in your db/migrate
folder.
Find and change this line to whatever you want:
AdminUser.create!(:email => '[email protected]', :password => 'password', :password_confirmation => 'password')
Keep in mind though, that this is just the seed password, and is being exposed as plaintext. What you might want to do is set up the Devise controllers to have a password change action. Check out the wiki and the Railscast for help.
Comments
-
kidcapital almost 2 years
I got ActiveAdmin running with [email protected]//password, but I want to change these credentials. Anyone know how to change them?
-
wejrowski about 12 yearsThis works to create new users, what about changing passwords though?
-
whitehat101 almost 9 yearsThe link is your answer now routes to a "Create new page" instead of a wiki page with content. Answers should include more than just a link.