Class: Spree::BankPayments::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Spree::BankPayments::Generators::InstallGenerator
- Defined in:
- lib/generators/spree/bank_payments/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_migrations ⇒ Object
12 13 14 15 16 17 |
# File 'lib/generators/spree/bank_payments/install/install_generator.rb', line 12 def copy_migrations # Scoped to this engine only: sets ENV["FROM"] = "spree_bank_payments" before # delegating to railties:install:migrations, so migrations pending on other # railties (e.g. action_mailbox, acts_as_taggable_on) are never touched. rake 'spree_bank_payments:install:migrations' end |
#run_migrations ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/generators/spree/bank_payments/install/install_generator.rb', line 19 def run_migrations if run_migrations? rake 'db:migrate' else say_status :skip, 'db:migrate — remember to run it before using the gem', :yellow end end |