Class: Georgia::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Georgia::Generators::InstallGenerator
- Defined in:
- lib/generators/georgia/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_templates ⇒ Object
23 24 25 26 27 |
# File 'lib/generators/georgia/install/install_generator.rb', line 23 def copy_templates copy_file "config/initializers/georgia.rb" copy_file "config/initializers/carrierwave.example.rb" copy_file "app/controllers/pages_controller.rb" end |
#mount_engine ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/generators/georgia/install/install_generator.rb', line 11 def mount_engine # Must be in reverse order to keep priorities route "# root to: 'pages#show', request_path: 'home'" route "# get '*request_path', to: 'pages#show', as: :page" route "mount Ckeditor::Engine => '/ckeditor'" route "mount Georgia::Engine => '/admin'" end |
#run_migrations ⇒ Object
19 20 21 |
# File 'lib/generators/georgia/install/install_generator.rb', line 19 def run_migrations rake "railties:install:migrations" end |
#show_readme ⇒ Object
29 30 31 |
# File 'lib/generators/georgia/install/install_generator.rb', line 29 def show_readme readme "README" end |