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