Class: ShopifyApp::Generators::HomeControllerGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ShopifyApp::Generators::HomeControllerGenerator
- Defined in:
- lib/generators/shopify_app/home_controller/home_controller_generator.rb
Instance Method Summary collapse
- #add_home_index_route ⇒ Object
- #create_home_controller ⇒ Object
- #create_home_index_view ⇒ Object
- #create_products_controller ⇒ Object
Instance Method Details
#add_home_index_route ⇒ Object
24 25 26 |
# File 'lib/generators/shopify_app/home_controller/home_controller_generator.rb', line 24 def add_home_index_route route("root :to => 'home#index'") end |
#create_home_controller ⇒ Object
12 13 14 |
# File 'lib/generators/shopify_app/home_controller/home_controller_generator.rb', line 12 def create_home_controller template(home_controller_template, 'app/controllers/home_controller.rb') end |
#create_home_index_view ⇒ Object
20 21 22 |
# File 'lib/generators/shopify_app/home_controller/home_controller_generator.rb', line 20 def create_home_index_view template('index.html.erb', 'app/views/home/index.html.erb') end |
#create_products_controller ⇒ Object
16 17 18 |
# File 'lib/generators/shopify_app/home_controller/home_controller_generator.rb', line 16 def create_products_controller generate("shopify_app:products_controller") unless end |