Sha256: 7556543f8bcfa56bd018cfeb286181f9c89738e47e7074fbef380deeacb56488

Contents?: true

Size: 636 Bytes

Versions: 10

Compression:

Stored size: 636 Bytes

Contents

class Image < ActiveRecord::Base

  has_attached :file, :processor => :image, :path => "images/files/:style/:identifier:extension", 
    :styles => {
      :full  => { :size => "400x400#", :extension => ".jpg", :quality => 90 },
      :large => { :size => "400x400<", :extension => ".jpg", :quality => 90 },
      :small => { :size => "200x200>", :extension => ".jpg", :quality => 90 },
      :thumb => { :size => "100x100#", :extension => ".jpg", :quality => 90 },
    }

  validates_attached_presence :file
  validates_attached_size :file, :in => 2.kilobytes..2.megabytes
  validates_attached_extension :file, :in => %w(png jpg)

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
attached-1.0.4 test/dummy/app/models/image.rb
attached-1.0.3 test/dummy/app/models/image.rb
attached-1.0.2 test/dummy/app/models/image.rb
attached-1.0.1 test/dummy/app/models/image.rb
attached-1.0.0 test/dummy/app/models/image.rb
attached-0.6.0 test/dummy/app/models/image.rb
attached-0.5.9 test/dummy/app/models/image.rb
attached-0.5.8 test/dummy/app/models/image.rb
attached-0.5.7 test/dummy/app/models/image.rb
attached-0.5.6 test/dummy/app/models/image.rb