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

12 lines
278 B
Ruby

class Cal
include Mongoid::Document
include Mongoid::Timestamps
include OrbitTag::Taggable
taggable
field :name, localize: true
field :color
has_many :events, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :events, :allow_destroy => true
end