Class: Shopifydev::ProductUiGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Shopifydev::ProductUiGenerator
- Defined in:
- lib/rails/generators/shopifydev/product_ui_generator.rb
Instance Method Summary collapse
- #add_inline_error_helper ⇒ Object
- #generate_controller ⇒ Object
- #generate_views ⇒ Object
- #routes ⇒ Object
Instance Method Details
#add_inline_error_helper ⇒ Object
18 19 20 |
# File 'lib/rails/generators/shopifydev/product_ui_generator.rb', line 18 def add_inline_error_helper template "helpers/inline_error_helper.rb", "app/helpers/inline_error_helper.rb" end |
#generate_controller ⇒ Object
14 15 16 |
# File 'lib/rails/generators/shopifydev/product_ui_generator.rb', line 14 def generate_controller template "controllers/product_caches_controller.rb", "app/controllers/product_caches_controller.rb" end |
#generate_views ⇒ Object
8 9 10 11 12 |
# File 'lib/rails/generators/shopifydev/product_ui_generator.rb', line 8 def generate_views template "views/product_caches/_app_fields_header.html.slim", "app/views/product_caches/_app_fields_header.html.slim" template "views/product_caches/_app_fields.html.slim", "app/views/product_caches/_app_fields.html.slim" template "views/product_caches/index.html.slim", "app/views/product_caches/index.html.slim" end |
#routes ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rails/generators/shopifydev/product_ui_generator.rb', line 22 def routes route %Q{ resources :product_caches, only: [:index] do collection do get 'page/:page', action: :index put 'update_multiple' end end } end |