-
Notifications
You must be signed in to change notification settings - Fork 361
Description
Thanks for this gem, it's super useful and I like everything.
There's a feature I would like to implement though, but before starting I'd ask you what you think about it.
I suppose this gem is built with the convintion that the duration (or end_time) should be related to the schedule, but I think it's better to assign duration to the Rules. I explain why.
I'm creating a Rails booking engine, that should allow developers to implement a booking system for various use cases (hotels, apartments, shows, meeting rooms etc...). Let's take the MeetingRoom case.
I would create an IceCube::Schedule attribute into the MeetingRoom model, that represents the availability of the MeetingRoom. Let's say this MeetingRoom is available on mondays and tuesdays from 8AM to 10AM and from 2PM to 6PM.
the 8AM-10AM interval has a duration of 2 hours, while the 2PM to 6PM has a duration of 4 hours. Having the duration related to Rules would allow for keeping the whole availability of the MeetingRoom inside the same Schedule. This would be great for making occurrence queries once, instead of having a number schedules I should cycle everytime.
I hope I explained the problem. I'm really interested in this gem, and it would be great to include it in my engine, but the single schedule thing is a costraint I need.