Class: SpreeMobility::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SpreeMobility::Generators::InstallGenerator
- Defined in:
- lib/generators/spree_mobility/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_javascripts ⇒ Object
6 7 8 |
# File 'lib/generators/spree_mobility/install/install_generator.rb', line 6 def add_javascripts append_file "vendor/assets/javascripts/spree/backend/all.js", "//= require spree/backend/spree_mobility\n" end |
#add_migrations ⇒ Object
10 11 12 |
# File 'lib/generators/spree_mobility/install/install_generator.rb', line 10 def add_migrations run 'bundle exec rake spree_mobility:install:migrations' end |
#run_migrations ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/generators/spree_mobility/install/install_generator.rb', line 14 def run_migrations if [:migrate] run 'bundle exec rake db:migrate' else puts "Skiping rake db:migrate, don't forget to run it!" end end |