Class: Smerp::Quotation::Engine::QuotationItemGroupsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Smerp::Quotation::Engine::QuotationItemGroupsController
- Defined in:
- app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /quotation_item_groups.
-
#destroy ⇒ Object
DELETE /quotation_item_groups/1.
-
#edit ⇒ Object
GET /quotation_item_groups/1/edit.
- #find_quotation ⇒ Object
-
#index ⇒ Object
GET /quotation_item_groups.
-
#new ⇒ Object
GET /quotation_item_groups/new.
-
#show ⇒ Object
GET /quotation_item_groups/1.
-
#update ⇒ Object
PATCH/PUT /quotation_item_groups/1.
Instance Method Details
#create ⇒ Object
POST /quotation_item_groups
33 34 35 36 37 38 39 40 41 |
# File 'app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb', line 33 def create @quotation_item_group = QuotationItemGroup.new(quotation_item_group_params) if @quotation_item_group.save redirect_to @quotation, notice: "Quotation item group was successfully created." else render :new, status: :unprocessable_entity end end |
#destroy ⇒ Object
DELETE /quotation_item_groups/1
53 54 55 56 |
# File 'app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb', line 53 def destroy @quotation_item_group.destroy redirect_to @quotation, notice: "Quotation item group was successfully destroyed." end |
#edit ⇒ Object
GET /quotation_item_groups/1/edit
29 30 |
# File 'app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb', line 29 def edit end |
#find_quotation ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb', line 6 def find_quotation if params[:quotation_item_group].nil? @quotation = Quotation.find(params[:quotation_id]) else @quotation = Quotation.find(params[:quotation_item_group][:quotation_id]) end end |
#index ⇒ Object
GET /quotation_item_groups
15 16 17 |
# File 'app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb', line 15 def index @quotation_item_groups = QuotationItemGroup.all end |
#new ⇒ Object
GET /quotation_item_groups/new
24 25 26 |
# File 'app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb', line 24 def new @quotation_item_group = QuotationItemGroup.new end |
#show ⇒ Object
GET /quotation_item_groups/1
20 21 |
# File 'app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb', line 20 def show end |
#update ⇒ Object
PATCH/PUT /quotation_item_groups/1
44 45 46 47 48 49 50 |
# File 'app/controllers/smerp/quotation/engine/quotation_item_groups_controller.rb', line 44 def update if @quotation_item_group.update(quotation_item_group_params) redirect_to @quotation, notice: "Quotation item group was successfully updated." else render :edit, status: :unprocessable_entity end end |