mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
16 lines
306 B
Ruby
16 lines
306 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Pundit Additional context for authorizing a product offering
|
|
class CartContext
|
|
attr_reader :customer_id, :is_offered
|
|
|
|
def initialize(customer_id, is_offered)
|
|
@customer_id = customer_id
|
|
@is_offered = is_offered
|
|
end
|
|
|
|
def policy_class
|
|
CartPolicy
|
|
end
|
|
end
|