gallery/app/models/album_image.rb

17 lines
511 B
Ruby
Raw Normal View History

2015-10-23 06:50:07 +00:00
require 'net/http'
class AlbumImage
include Mongoid::Document
include Mongoid::Timestamps
include OrbitTag::Taggable
mount_uploader :file, GalleryUploader
field :title
field :description, localize: true
2014-06-13 08:15:13 +00:00
field :rss2_id, type: String
field :order, type: Integer, default: -1
# has_and_belongs_to_many :tags, :class_name => "GalleryTag"
belongs_to :album
has_many :album_crops, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :album_crops, :allow_destroy => true
end