Class: Smerp::Quotation::Engine::QuotationProductCategoriesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Smerp::Quotation::Engine::QuotationProductCategoriesController
- Defined in:
- app/controllers/smerp/quotation/engine/quotation_product_categories_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /quotation_product_categories.
-
#destroy ⇒ Object
DELETE /quotation_product_categories/1.
-
#edit ⇒ Object
GET /quotation_product_categories/1/edit.
-
#index ⇒ Object
GET /quotation_product_categories.
-
#new ⇒ Object
GET /quotation_product_categories/new.
-
#show ⇒ Object
GET /quotation_product_categories/1.
-
#update ⇒ Object
PATCH/PUT /quotation_product_categories/1.
Instance Method Details
#create ⇒ Object
POST /quotation_product_categories
24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/smerp/quotation/engine/quotation_product_categories_controller.rb', line 24 def create @quotation_product_category = QuotationProductCategory.new(quotation_product_category_params) if @quotation_product_category.save redirect_to @quotation_product_category, notice: "Quotation product category was successfully created." else render :new, status: :unprocessable_entity end end |
#destroy ⇒ Object
DELETE /quotation_product_categories/1
44 45 46 47 |
# File 'app/controllers/smerp/quotation/engine/quotation_product_categories_controller.rb', line 44 def destroy @quotation_product_category.destroy redirect_to quotation_product_categories_url, notice: "Quotation product category was successfully destroyed." end |
#edit ⇒ Object
GET /quotation_product_categories/1/edit
20 21 |
# File 'app/controllers/smerp/quotation/engine/quotation_product_categories_controller.rb', line 20 def edit end |
#index ⇒ Object
GET /quotation_product_categories
6 7 8 |
# File 'app/controllers/smerp/quotation/engine/quotation_product_categories_controller.rb', line 6 def index @quotation_product_categories = QuotationProductCategory.all end |
#new ⇒ Object
GET /quotation_product_categories/new
15 16 17 |
# File 'app/controllers/smerp/quotation/engine/quotation_product_categories_controller.rb', line 15 def new @quotation_product_category = QuotationProductCategory.new end |
#show ⇒ Object
GET /quotation_product_categories/1
11 12 |
# File 'app/controllers/smerp/quotation/engine/quotation_product_categories_controller.rb', line 11 def show end |
#update ⇒ Object
PATCH/PUT /quotation_product_categories/1
35 36 37 38 39 40 41 |
# File 'app/controllers/smerp/quotation/engine/quotation_product_categories_controller.rb', line 35 def update if @quotation_product_category.update(quotation_product_category_params) redirect_to @quotation_product_category, notice: "Quotation product category was successfully updated." else render :edit, status: :unprocessable_entity end end |