Add these lines to Gemfile:
gem 'devise', github: 'plataformatec/devise' gem 'responders', github: 'plataformatec/responders' gem 'inherited_resources', github: 'josevalim/inherited_resources' gem 'activeadmin', github: 'activeadmin' gem 'polyamorous', github: 'activerecord-hackery/polyamorous' gem 'ransack', github: 'activerecord-hackery/ransack' gem 'formtastic', github: 'justinfrench/formtastic'
Run:
bundle install rails g active_admin:install rake db:migrate
in config/environments/development.rb add:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
And:
rails g devise:views rails s
The default user is ‘admin@example.com’ with the password: ‘password’
If the above account doesn’t work, create one:
rails console AdminUser.new({ :email => 'admin@example.com', :password => 'password', :password_confirmation => 'password'}).save
To register a model, run:
rails g active_admin:resource Post
This will create app/admin/post.rb, add for example:
permit_params :title, :body