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

16 lines
304 B
Ruby
Raw Normal View History

# 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