class TemplateImageFile require "ostruct" include Mongoid::Document include Mongoid::Timestamps mount_uploader :image_file, GalleryUploader field :order, :type => Integer, :default => 0 belongs_to :r_template def album_crops [] end def file self.image_file end def album tmp = OpenStruct.new tmp.album_colors = album_colors tmp.resize_gravity = 'Center' tmp end def album_id nil end def album_colors [{'color' => 'transparent'}] end end