1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00
fab-manager/app/policies/subscription_context.rb
Sylvain 35ce577651 [bug] subscription page shows the groups without any active plans
[bug] cart price inconsistently updated after a subscription
[feature] plans page for managers
2020-04-29 10:57:32 +02:00

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