You are here: Browse Railsplugins Acts As Calendar Item
You need to run the migrate script create_calendar_items.rb
How to use:
Let’s assume you have a model named Event, with an ID of 1. In your event.rb model, add this line:
acts_as_calendar_item
To attach a date to this event:
ci = CalendarItem.new ci.calendarable_id = 1 ci.calendarable_type = “Event” ci.item_date = Time.now ci.save
e = Event.find(1, :include => :calendar_items) e.calendar_items
NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly