Class: Crm::Items::CustomMatsController
- Inherits:
-
CrmController
- Object
- CrmController
- Crm::Items::CustomMatsController
- Defined in:
- app/controllers/crm/items/custom_mats_controller.rb
Overview
Controller: custom mats.
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/crm/items/custom_mats_controller.rb', line 9 def create (:create, Item) @custom_mat = Item::CustomMatCreator.new(custom_mat_params) if (@item = @custom_mat.save) flash[:info] = "Custom mat item #{@item.sku} has been created." redirect_to @item else render action: 'new', status: :unprocessable_content end end |
#new ⇒ Object
4 5 6 7 |
# File 'app/controllers/crm/items/custom_mats_controller.rb', line 4 def new (:create, Item) @custom_mat = Item::CustomMatCreator.new end |