app/models/concerns/products/scheduling_support.rb
# find the next available reservation based on schedule rules and existing reservations
find the next available reservation based on schedule rules and existing reservations
find the next available reservation based on schedule rules and existing reservations
def next_available_reservation(after: Time.zone.now, duration: 1.minute, options: {})
    rules = rules_for_day(after.wday, options[:user])
    return nil unless rules.any?
    reservation_in_week(after, duration, rules, options)
  end
def next_available_reservation ( after : Time . zone . now , duration : 1 . minute , options : { } ) rules = rules_for_day ( after . wday , options [ :user ] ) return nil unless rules . any? reservation_in_week ( after , duration , rules , options ) end
find the next available reservation based on schedule rules and existing reservations
find the next available reservation based on schedule rules and existing reservations
# if the user has no schedule rules, there will be no time that they can # move the reservation to
after
<not_specific>
zone
<not_specific>
now
<not_specific>
duration
<not_specific>
minute
<not_specific>
options
<not_specific>