Class: Helpdesk::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Helpdesk::Generators::InstallGenerator
- Defined in:
- lib/generators/helpdesk/install_generator.rb
Instance Method Summary collapse
- #add_engine_to_route ⇒ Object
- #copy_initializer ⇒ Object
- #copy_locale ⇒ Object
- #run_rake ⇒ Object
- #show_readme ⇒ Object
Instance Method Details
#add_engine_to_route ⇒ Object
24 25 26 |
# File 'lib/generators/helpdesk/install_generator.rb', line 24 def add_engine_to_route route "mount Helpdesk::Engine, :at => '/helpdesk'" end |
#copy_initializer ⇒ Object
10 11 12 |
# File 'lib/generators/helpdesk/install_generator.rb', line 10 def copy_initializer template "helpdesk.rb", "config/initializers/helpdesk.rb" end |
#copy_locale ⇒ Object
14 15 16 17 |
# File 'lib/generators/helpdesk/install_generator.rb', line 14 def copy_locale copy_file "../../../../config/locales/helpdesk.en.yml", "config/locales/helpdesk.en.yml" copy_file "../../../../config/locales/helpdesk.pl.yml", "config/locales/helpdesk.pl.yml" end |
#run_rake ⇒ Object
19 20 21 22 |
# File 'lib/generators/helpdesk/install_generator.rb', line 19 def run_rake rake "helpdesk:install:migrations" rake "db:migrate" end |
#show_readme ⇒ Object
28 29 30 |
# File 'lib/generators/helpdesk/install_generator.rb', line 28 def show_readme readme "README" if behavior == :invoke end |