Sha256: 491f44bbe76fbd4b152a1259fb473a0727004e51cb5c81b830ebae8143e75d45

Contents?: true

Size: 342 Bytes

Versions: 5

Compression:

Stored size: 342 Bytes

Contents

module Comable
  module ShipmentAction
    private

    # orderride OrdersController#order_params
    def order_params
      return super unless params[:state] == 'shipment'
      order_params_for_shipment
    end

    def order_params_for_shipment
      params.fetch(:order, {}).permit(
        :shipment_method_id
      )
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
comable_frontend-0.3.4 app/controllers/concerns/comable/shipment_action.rb
comable_frontend-0.3.3 app/controllers/concerns/comable/shipment_action.rb
comable_frontend-0.3.2 app/controllers/concerns/comable/shipment_action.rb
comable_frontend-0.3.1 app/controllers/concerns/comable/shipment_action.rb
comable_frontend-0.3.0 app/controllers/concerns/comable/shipment_action.rb