orbit-calendar/app/models/event_category.rb

11 lines
294 B
Ruby

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