Class: Spree::PaypalPlatform::Generators::InstallGenerator

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

Overview

Copies this gem's migrations into the host app and optionally runs them.

Instance Method Summary collapse

Instance Method Details

#copy_migrationsObject



17
18
19
# File 'lib/generators/spree/paypal_platform/install/install_generator.rb', line 17

def copy_migrations
  rake 'spree_paypal_platform:install:migrations'
end

#run_migrationsObject



21
22
23
24
25
26
27
# File 'lib/generators/spree/paypal_platform/install/install_generator.rb', line 21

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