Sha256: a5008038a1fd291a7a7bdd0bce5bac9922dcc4992f1836efb696639b140acf58
Contents?: true
Size: 563 Bytes
Versions: 13
Compression:
Stored size: 563 Bytes
Contents
class Photo < ActiveRecord::Base validates_attachment :image, :presence => true, :size => { :in => 0..2.megabytes } has_attached :image, :styles => { :large => ["800x600", :jpeg], :thumb => ["100x100", :jpeg] } acts_as_taggable validates_presence_of :photographable belongs_to :photographable, :polymorphic => :true delegate :url, :file_name, :to => :image field :caption, :text, :translatable => true def owner photographable.owner if photographable && photographable.respond_to?(:owner) end timestamps end
Version data entries
13 entries across 13 versions & 1 rubygems