Skip to content

Instantly share code, notes, and snippets.

@kcc0
Created October 2, 2014 10:43
Show Gist options
  • Save kcc0/27d6b1482fa0b6b6c8f6 to your computer and use it in GitHub Desktop.
Save kcc0/27d6b1482fa0b6b6c8f6 to your computer and use it in GitHub Desktop.
ActiveAdmin manual setup post installation
Some setup you must do manually if you haven't yet:
1. Ensure you have defined default url options in your environments files. Here
is an example of default_url_options appropriate for a development environment
in config/environments/development.rb:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
In production, :host should be set to the actual host of your application.
2. Ensure you have defined root_url to *something* in your config/routes.rb.
For example:
root to: "home#index"
3. Ensure you have flash messages in app/views/layouts/application.html.erb.
For example:
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
4. If you are deploying on Heroku with Rails 3.2 only, you may want to set:
config.assets.initialize_on_precompile = false
On config/application.rb forcing your application to not access the DB
or load models when precompiling your assets.
5. You can copy Devise views (for customization) to your app by running:
rails g devise:views
===============================================================================
invoke active_record
create db/migrate/20140929203739_devise_create_admin_users.rb
create app/models/admin_user.rb
invoke rspec
create spec/models/admin_user_spec.rb
insert app/models/admin_user.rb
route devise_for :admin_users
gsub app/models/admin_user.rb
gsub config/routes.rb
insert db/migrate/20140929203739_devise_create_admin_users.rb
create config/initializers/active_admin.rb
create app/admin
create app/admin/dashboard.rb
create app/admin/admin_user.rb
insert config/routes.rb
generate active_admin:assets
create app/assets/javascripts/active_admin.js.coffee
create app/assets/stylesheets/active_admin.css.scss
create db/migrate/20140929203742_create_active_admin_comments.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment