Class: AdministrateBootstrapTheme::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- AdministrateBootstrapTheme::InstallGenerator
- Defined in:
- lib/generators/administrate_bootstrap_theme/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#append_assets ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/generators/administrate_bootstrap_theme/install/install_generator.rb', line 7 def append_assets append_file 'config/initializers/assets.rb', " Rails.application.config.assets.precompile += %w[\n administrate-bootstrap-theme.scss\n administrate-bootstrap-theme/theme.css\n administrate-bootstrap-theme/bootstrap.bundle.js\n ]\n FILE\nend\n" |
#create_initializer ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/generators/administrate_bootstrap_theme/install/install_generator.rb', line 25 def create_initializer initializer 'administrate_bootstrap_theme.rb', " Administrate::Engine.stylesheets.clear # required to remove Administrate base styles\n Administrate::Engine.add_stylesheet('administrate-bootstrap-theme')\n Administrate::Engine.add_javascript('administrate-bootstrap-theme/bootstrap.bundle.js')\n FILE\nend\n" |
#create_stylesheets_assets ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/generators/administrate_bootstrap_theme/install/install_generator.rb', line 17 def create_stylesheets_assets create_file 'app/assets/stylesheets/administrate-bootstrap-theme.scss', " @import 'administrate-bootstrap-theme/colors/default';\n @import 'administrate-bootstrap-theme/fonts/source_sans_pro';\n @import 'administrate-bootstrap-theme/theme';\n FILE\nend\n" |