Sha256: 55cd4e31c94bb9daad98098c5fb04f714e9a53a50031c4e1d2074baff57f4a4f

Contents?: true

Size: 359 Bytes

Versions: 9

Compression:

Stored size: 359 Bytes

Contents

module Comable
  module PaymentAction
    private

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

    def order_params_for_payment
      params.fetch(:order, {}).permit(
        payment_attributes: [:payment_method_id]
      )
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
comable-frontend-0.7.1 app/controllers/concerns/comable/payment_action.rb
comable-frontend-0.7.0 app/controllers/concerns/comable/payment_action.rb
comable-frontend-0.7.0.beta2 app/controllers/concerns/comable/payment_action.rb
comable-frontend-0.7.0.beta1 app/controllers/concerns/comable/payment_action.rb
comable-frontend-0.6.0 app/controllers/concerns/comable/payment_action.rb
comable_frontend-0.5.0 app/controllers/concerns/comable/payment_action.rb
comable_frontend-0.4.2 app/controllers/concerns/comable/payment_action.rb
comable_frontend-0.4.1 app/controllers/concerns/comable/payment_action.rb
comable_frontend-0.4.0 app/controllers/concerns/comable/payment_action.rb