Sha256: 646f8cb8617dd6bedd94fd45ae8e634aed11ff3cd6b5d1a0e2a11b0b59d79d72
Contents?: true
Size: 805 Bytes
Versions: 42
Compression:
Stored size: 805 Bytes
Contents
module Effective module Providers module Free extend ActiveSupport::Concern def free @order ||= Order.find(params[:id]) EffectiveOrders.authorize!(self, :update, @order) unless @order.free? flash[:danger] = 'Unable to process free order with a non-zero total' redirect_to effective_orders.order_path(@order) return end order_purchased( payment: 'free order. no payment required.', provider: 'free', card: 'none', purchased_url: params[:purchased_url], declined_url: params[:declined_url], email: false ) end def free_params params.require(:effective_order).permit(:purchased_url, :declined_url) end end end end
Version data entries
42 entries across 42 versions & 1 rubygems
Version | Path |
---|---|
effective_orders-4.0.0beta3 | app/controllers/effective/providers/free.rb |
effective_orders-4.0.0beta2 | app/controllers/effective/providers/free.rb |