class GalleryAlbum
	include Mongoid::Document
  	include Mongoid::Timestamps

  	field :name, localize: true
  	field :description, localize: true
  	field :cover, default: "default"
  	field :cover_path   #can  refact
  	field :tag_names

  	belongs_to :gallery_category
  	has_and_belongs_to_many :tags, :class_name => "GalleryTag"
  	has_many :gallery_images, :autosave => true, :dependent => :destroy
    accepts_nested_attributes_for :gallery_images, :allow_destroy => true

end