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