Class: Hashrocket::UiGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hashrocket::UiGenerator
- Includes:
- Generators
- Defined in:
- lib/generators/hashrocket/ui/ui_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_route ⇒ Object
12 13 14 |
# File 'lib/generators/hashrocket/ui/ui_generator.rb', line 12 def add_route route "match '/ui(/:action)', controller: 'ui'" end |
#commit ⇒ Object
16 17 18 |
# File 'lib/generators/hashrocket/ui/ui_generator.rb', line 16 def commit super 'Add ui controller' end |
#setup_ui ⇒ Object
7 8 9 10 |
# File 'lib/generators/hashrocket/ui/ui_generator.rb', line 7 def setup_ui template 'ui_controller.rb', 'app/controllers/ui_controller.rb' gitkeep 'app/views/ui' end |