Orbit/vendor/built_in_modules/calendar/app/models/cal.rb

9 lines
237 B
Ruby
Raw Normal View History

2012-09-14 13:59:20 +00:00
class Cal
include Mongoid::Document
include Mongoid::Timestamps
field :name, localize: true
field :color
has_many :events, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :events, :allow_destroy => true
end