This is a gem intended for private consumption! You are welcome to use it but I suggest you fork it first. Things may suddenly and drastically change on a whime!
What's this for?
Recurring_helpers is a library of various tools for dealing with recurring events. It is essentially glue between an application's event-like model, the event-calendar gem, and the ri_cal gem. Some of the superpowers it gives event-like models are iCal export, recurring occurrence caching, and conflict detection. As a bonus you also get some view helpers for making it easier to deal with recurring event rules.
Setup your event-like model
class Event < ActiveModel::Base # The EventOccurrence model is updated automatically when Event is saved has_many :event_occurrences # The EventRule model should be user-updatable, it's attributes being directly set by a user interface has_many :event_rules # The is_recurring macro extends Event so that when it is saved an iCal file is generated, cached into the attribute cached_ical, and the event_occurrences collection is generated based on the rules, start, and end times. The event_occurrences collection should not be modified by the end user and treated as a read-only cache. The purpose of this is to simplify the logic needed by event-calendar to draw a pretty calendar. It allows event occurrences to be queried with little effort at the expense of a slightly more expensive save action. is_recurring end
Setup your user interface
Contributing to recurring_helpers
Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
Fork the project
Start a feature/bugfix branch
Commit and push until you are happy with your contribution
Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright © 2011 Matthew Daubert. See LICENSE.txt for further details.