orbit-calendar/app/models/event_category.rb

11 lines
294 B
Ruby
Raw Permalink Normal View History

2014-01-15 09:04:38 +00:00
class EventCategory
include Mongoid::Document
include Mongoid::Timestamps
include OrbitCategory::Categorizable
field :name, localize: true
field :color
has_many :events, :dependent => :destroy
validates_presence_of :name, :message => "Please fill the name of the Category"
end