Class: KContactable::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#add_routeObject



18
19
20
21
# File 'lib/generators/k_contactable/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 Contactable::Engine => '/contacts'"
end

#copy_localesObject



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

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

#copy_migrationsObject



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

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