Skip to content
/ actic Public
forked from apptrix/actic

An implementation of iCal for active record objects using RiCal

License

Notifications You must be signed in to change notification settings

tevio/actic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actic
=====
Hi,

This is a very early beta, functionality is currently very limited.

This gem fuses iCalendar with ORM, can be used to make your data model date and event aware.
it can be used to create calendar objects and events at the moment,
more subcomponents will be added in time

Generators
=========

    rails g actic_calendar ### will generate a calendar model and migration with the model name Calendar.
    rails g actic_calendar NuCal owner:references ### you can supply a name and/or additional database fields
    rails g actic_calendar owner:references ### you can supply additional fields and no name!


API Example
==========

Models implementing this interface will need to offer an 'ical' string field ( t.string :ical ) in the database schema. ( if you use the generators you wont need to worry about this )

    class Event < ActiveRecord::Base
      include Actic::Event
    end

    event = Event.new
    event.start_time = DateTime.now
    event.end_time = DateTime.now + 3.hours

    event.recurrence = "FREQ=DAILY;COUNT=10"
    # OR
    event.recurs :freq => :daily, :count => 10

    event.description = "Bake Cake"
    event.occurrences(:after => DateTime.now, :before => (DateTime.now + 5.days))


   class Calendar < ActiveRecord::Base
     include Actic::Calendar
   end

   c = Calendar.new
   c.add_subcomponent event




Copyright (c) 2010 Steve Martin, released under the MIT license


About

An implementation of iCal for active record objects using RiCal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%