mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-30 11:24:21 +01:00
35ce577651
[bug] cart price inconsistently updated after a subscription [feature] plans page for managers
17 lines
353 B
Ruby
17 lines
353 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Pundit Additional context to validate the price of a subscription
|
|
class SubscriptionContext
|
|
attr_reader :subscription, :price, :user_id
|
|
|
|
def initialize(subscription, price, user_id)
|
|
@subscription = subscription
|
|
@price = price
|
|
@user_id = user_id
|
|
end
|
|
|
|
def policy_class
|
|
SubscriptionPolicy
|
|
end
|
|
end
|