Class: Hashrocket::UiGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Generators
Defined in:
lib/generators/hashrocket/ui/ui_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_routeObject



12
13
14
# File 'lib/generators/hashrocket/ui/ui_generator.rb', line 12

def add_route
  route "match '/ui(/:action)', controller: 'ui'"
end

#commitObject



16
17
18
# File 'lib/generators/hashrocket/ui/ui_generator.rb', line 16

def commit
  super 'Add ui controller'
end

#setup_uiObject



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