Sha256: 602ac3dd83b46304d05b4327e3a542b56de8735a5fe826cba4c93164ee1be06c
Contents?: true
Size: 616 Bytes
Versions: 13
Compression:
Stored size: 616 Bytes
Contents
module MechanizeStore class ProductPhoto < ActiveRecord::Base belongs_to :product, class_name: MechanizeStore::Product has_attached_file :file, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png", path: "#{Rails.root}/public/photos/:id/:style.:extension", url: "/photos/:id/:style.:extension" # storage: :s3, # s3_credentials: "#{Rails.root}/config/amazon_s3.yml" # validates_attachment_content_type :file, :content_type => /png|jpg|jpeg/ validates :file, :attachment_presence => true end end
Version data entries
13 entries across 13 versions & 1 rubygems