Class: Taxable::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_routeObject



18
19
20
21
# File 'lib/generators/taxable/install_generator.rb', line 18

def add_route
  # Sisnce this engine isn't mountable, don't need to be mounted, so remove this line
  # route "mount Taxable::Engine => '/taxes'"
end

#copy_localesObject



13
14
15
16
# File 'lib/generators/taxable/install_generator.rb', line 13

def copy_locales
  copy_file "../../../../config/locales/en.yml", "config/locales/taxable.en.yml"
  copy_file "../../../../config/locales/es.yml", "config/locales/taxable.es.yml"
end

#copy_migrationsObject



8
9
10
11
# File 'lib/generators/taxable/install_generator.rb', line 8

def copy_migrations
  rake "taxable_engine:install:migrations"
  rake "db:migrate"
end