2012-07-25 08:20:07 +00:00
|
|
|
class GalleryAlbum
|
|
|
|
include Mongoid::Document
|
|
|
|
include Mongoid::Timestamps
|
|
|
|
|
|
|
|
field :name
|
|
|
|
field :description
|
2012-07-29 10:52:30 +00:00
|
|
|
field :cover, default: "default"
|
|
|
|
field :cover_path
|
2012-07-25 08:20:07 +00:00
|
|
|
|
|
|
|
belongs_to :gallery_category
|
|
|
|
has_many :gallery_images, :autosave => true, :dependent => :destroy
|
|
|
|
|
|
|
|
end
|