Sha256: c46b017b9c5337e1e601e2a91e686739dca53add275a613c396562379122e3e3
Contents?: true
Size: 618 Bytes
Versions: 3
Compression:
Stored size: 618 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
3 entries across 3 versions & 1 rubygems