Class: BcmsBitly::InstallGenerator
- Inherits:
-
Cms::ModuleInstallation
- Object
- Cms::ModuleInstallation
- BcmsBitly::InstallGenerator
- Defined in:
- lib/generators/bcms_bitly/install/install_generator.rb
Instance Method Summary collapse
- #add_routes ⇒ Object
-
#copy_intializer ⇒ Object
Uncomment to add module specific seed data to a project.
- #copy_migrations ⇒ Object
Instance Method Details
#add_routes ⇒ Object
22 23 24 |
# File 'lib/generators/bcms_bitly/install/install_generator.rb', line 22 def add_routes mount_engine(BcmsBitly) end |
#copy_intializer ⇒ Object
Uncomment to add module specific seed data to a project. def add_seed_data_to_project
copy_file "../bcms_bitly.seeds.rb", "db/bcms_bitly.seeds.rb"
append_to_file "db/seeds.rb", "load File.expand_path('../bcms_bitly.seeds.rb', __FILE__)\n"
end
17 18 19 20 |
# File 'lib/generators/bcms_bitly/install/install_generator.rb', line 17 def copy_intializer source_path = File.('../templates/config/initializers/bcms_bitly.rb', __FILE__) copy_file source_path, 'config/initializers/bcms_bitly.rb' end |
#copy_migrations ⇒ Object
7 8 9 |
# File 'lib/generators/bcms_bitly/install/install_generator.rb', line 7 def copy_migrations rake 'bcms_bitly:install:migrations' end |