mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
66f81a975e
Migration from cart_items:{reservation:{}, subscription:{}, ...} to cart_items:{items:[{reservation:{}, ...}], ...}
16 lines
316 B
Ruby
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
|