Class: ActiveAdmin::Generators::AssetsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActiveAdmin::Generators::AssetsGenerator
- Defined in:
- lib/generators/active_admin/assets/assets_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
5 6 7 |
# File 'lib/generators/active_admin/assets/assets_generator.rb', line 5 def self.source_root @_active_admin_source_root ||= File.("../templates", __FILE__) end |
Instance Method Details
#install_assets ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/active_admin/assets/assets_generator.rb', line 9 def install_assets if ActiveAdmin.use_asset_pipeline? template '3.1/active_admin.js', 'app/assets/javascripts/active_admin.js' template '3.1/active_admin.css.scss', 'app/assets/stylesheets/active_admin.css.scss' else template '3.0/active_admin.js', 'public/javascripts/active_admin.js' directory '../../../../../app/assets/images/active_admin', 'public/images/active_admin' end end |