Class: Administrate::NotusTheme::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/administrate/notus_theme/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_initializerObject


14
15
16
17
18
19
20
21
22
# File 'lib/generators/administrate/notus_theme/install_generator.rb', line 14

def create_initializer
  initializer 'administrate_notus_theme.rb', <<~FILE
  # frozen_string_literan: true

  # Replace default theme to notus
  Administrate::Engine.stylesheets.clear
  Administrate::Engine.add_stylesheet('administrate-notus_theme/theme')
  FILE
end

8
9
10
11
12
# File 'lib/generators/administrate/notus_theme/install_generator.rb', line 8

def link_assets
  append_file 'app/assets/config/manifest.js', <<~FILE
  //= link administrate-notus_theme/theme.css
  FILE
end