Class: SpreeVariantOptions::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_javascriptsObject



11
12
13
14
# File 'lib/generators/spree_variant_options/install_generator.rb', line 11

def add_javascripts
  append_file "app/assets/javascripts/store/all.js", "//= require store/product_variant_options\n"
  append_file "app/assets/javascripts/store/all.js", "//= require store/variant_options\n"
end

#add_stylesheetsObject



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

def add_stylesheets
  inject_into_file "app/assets/stylesheets/store/all.css", "*= require store/variant_options\n", :before => /\*\//, :verbose => true
end

#copy_migrationsObject



7
8
9
# File 'lib/generators/spree_variant_options/install_generator.rb', line 7

def copy_migrations
  rake "spree_variant_options:install:migrations"
end