elevation / event_calendar

Show multiple, overlapping events across calendar days and rows. Rails plugin.
http://dev.elevationblog.com/2009/7/23/event-calendar-rails-plugin
MIT License
951 stars 213 forks source link

ORM Agnostic #35

Open victorbstan opened 13 years ago

victorbstan commented 13 years ago

How hard is it to make this plugin DB agnostic? Does it have to rely on ActiveRecord?

jeffschuil commented 13 years ago

I don't think it would be too difficult, though I haven't personally tried a nosql db. I've noticed a couple forks where people removed or modified the 'ActiveRecord::Base.extend EventCalendar::ClassMethods' line in railtie.rb, which I assume is for this purpose.

It seems to me you just need to get the events from the database (based on their start and end fields), and then the rest should work the same. This is done in the events_for_date_range method.