This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/models/group.rb

15 lines
270 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
2012-04-05 12:32:56 +00:00
self.tiles.build
self.tiles.build
2012-04-03 10:25:41 +00:00
end
end