1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/policies/local_payment_context.rb
Sylvain 66f81a975e WIP: array of items
Migration from cart_items:{reservation:{}, subscription:{}, ...}
to cart_items:{items:[{reservation:{}, ...}], ...}
2021-05-19 18:12:52 +02:00

16 lines
316 B
Ruby

# frozen_string_literal: true
# Pundit Additional context to validate the price of a local payment
class LocalPaymentContext
attr_reader :shopping_cart, :price
def initialize(shopping_cart, price)
@shopping_cart = shopping_cart
@price = price
end
def policy_class
LocalPaymentPolicy
end
end