mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-10 21:24:20 +01:00
16 lines
311 B
Ruby
16 lines
311 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Pundit Additional context to validate the price of a subscription
|
||
|
class SubscriptionContext
|
||
|
attr_reader :subscription, :price
|
||
|
|
||
|
def initialize(subscription, price)
|
||
|
@subscription = subscription
|
||
|
@price = price
|
||
|
end
|
||
|
|
||
|
def policy_class
|
||
|
SubscriptionPolicy
|
||
|
end
|
||
|
end
|