Orbit/app/models/group.rb

14 lines
248 B
Ruby
Raw Normal View History

2012-04-03 10:25:41 +00:00
class Group
include Mongoid::Document
include Mongoid::Timestamps
belongs_to :section
has_many :tiles, :autosave => true, :dependent => :destroy
before_create :initialize_tile
def initialize_tile
self.build_tile
end
end