Class: SpreeEssentials::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#append_javascriptsObject



15
16
17
18
# File 'lib/generators/spree_essentials/install_generator.rb', line 15

def append_javascripts
  return unless options[:add_javascripts]
  append_file "app/assets/javascripts/admin/all.js", "//= require admin/spree_essentials"
end

#append_stylesheetsObject



10
11
12
13
# File 'lib/generators/spree_essentials/install_generator.rb', line 10

def append_stylesheets
  return unless options[:add_stylesheets]
  gsub_file "app/assets/stylesheets/admin/all.css", "*/", "*= require admin/spree_essentials\n*/"  
end