Class: HrLite::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HrLite::Generators::InstallGenerator
- Defined in:
- lib/generators/hr_lite/install/install_generator.rb
Overview
rails g hr_lite:install — drops the annotated initializer and prints
the remaining wiring steps. With --route it also appends a mount line.
Instance Method Summary collapse
Instance Method Details
#add_route ⇒ Object
18 19 20 21 22 |
# File 'lib/generators/hr_lite/install/install_generator.rb', line 18 def add_route return unless [:route] route 'mount HrLite::Engine => "/hr", as: :hr_lite' end |
#copy_initializer ⇒ Object
14 15 16 |
# File 'lib/generators/hr_lite/install/install_generator.rb', line 14 def copy_initializer template "initializer.rb", "config/initializers/hr_lite.rb" end |
#show_next_steps ⇒ Object
24 25 26 |
# File 'lib/generators/hr_lite/install/install_generator.rb', line 24 def show_next_steps readme "AFTER_INSTALL" if behavior == :invoke end |