Class: Crm::Items::PriceListsController
- Inherits:
-
CrmController
- Object
- CrmController
- Crm::Items::PriceListsController
- Defined in:
- app/controllers/crm/items/price_lists_controller.rb
Overview
Controller: price lists.
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/crm/items/price_lists_controller.rb', line 13 def create @price_list = Pdf::Document::PriceList.new(price_list_params) if (@price_list_upload = @price_list.call) redirect_to upload_path(@price_list_upload) else render action: 'new', status: :unprocessable_content end end |
#new ⇒ Object
9 10 11 |
# File 'app/controllers/crm/items/price_lists_controller.rb', line 9 def new @price_list = Pdf::Document::PriceList.new(sub_title_1: 'PRICE LIST', sub_title_2: "EFFECTIVE: #{Date.current.to_fs(:crm_default)}", item_condition: 'new') end |
#show ⇒ Object
4 5 6 7 |
# File 'app/controllers/crm/items/price_lists_controller.rb', line 4 def show @price_list_upload = Upload.find(params[:id]) redirect_to upload_path(@price_list_upload) end |