Sha256: 6fb3ec0c909eba653eaeb7d69dd82376639dcb330672c24bd21e47afc144b8aa
Contents?: true
Size: 631 Bytes
Versions: 3
Compression:
Stored size: 631 Bytes
Contents
class ShopProductAttachment < ActiveRecord::Base default_scope :order => 'shop_product_attachments.position ASC' belongs_to :product, :class_name => 'ShopProduct', :foreign_key => :shop_product_id belongs_to :image acts_as_list :scope => :shop_product def url(*params) image.url(*params) rescue nil end def title(*params) image.title(*params) rescue nil end def caption(*params) image.caption(*params) rescue nil end class << self def params [ :id, :title, :caption, :image_file_name, :image_content_type, :image_file_size ] end end end
Version data entries
3 entries across 3 versions & 1 rubygems