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

17 lines
346 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, :user_id
def initialize(reservation, price, user_id)
@reservation = reservation
@price = price
@user_id = user_id
end
def policy_class
ReservationPolicy
end
end