No description or website provided.
Ruby HTML JavaScript CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.rdoc

Complex Dates

The Complex Dates plugin allows other models to be associated with Gregorian or Tibetan dates or date ranges. Complex Dates' helpers, views, and controllers are currently namespaced to “admin,” but this should be changed to allow for implementation in apps other than places_engine.

Implementation:

To use complex_dates, you'll need to run the sync task to copy complex_dates's public files and migrations to its parent app: rake complex_dates:sync

To make an association of complex dates to a model, say, Entity, the following steps need to be taken:

  • app/models/entity.rb

class Entity < ActiveRecord::Base

extend IsDateable

end

  • config/routes.rb

admin.resources :entities do |entity|

entity.resources :time_units, :collection => {:new_form => :get}

end

admin.resources :time_units do |time_unit|

time_unit.resources :notes, :collection => {:add_author => :get}

end

Dependencies

Complex Dates currently isn't generalized enough to be used outside of places_engine, so dependencies aren't relevant yet.