Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.33 KB

install_generator.md

File metadata and controls

49 lines (32 loc) · 1.33 KB

The install generator will automatically do these two changes to your files depending on the configuration used in ActiveAdmin:

Sprockets

  1. The following line will be added as the first line of app/assets/stylesheets/active_admin.scss:
@import 'activeadmin_addons/all'
  1. If your activeadmin installation uses an app/assets/javascripts/active_admin.js.coffee file, the following line will be added after #= require active_admin/base:
#= require activeadmin_addons/all
  1. If your activeadmin installation uses an app/assets/javascripts/active_admin.js file, the following line will be added after //= require active_admin/base:
//= require activeadmin_addons/all

Webpacker

  1. The following line will be added as the first line of app/javascript/stylesheets/active_admin.scss
@import 'activeadmin_addons/src/stylesheets/all'
  1. The following line will be added after import "@activeadmin/activeadmin" in app/javascript/packs/active_admin.js
import "activeadmin_addons" 
  1. yarn add activeadmin_addons will be run to add the npm package.

To undo, you can use

$ rails d activeadmin_addons:install
  1. An initializer will be added. From there, you can change the Addons' default config.