1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/policies/reservation_context.rb

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