Sha256: 64bf08a85f43233253b0a1377ced5c879373ade2fb1e4a1a3bc6da2196f01b58

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

class BasePost < ActiveRecord::Base
  self.table_name = 'posts'
end

class Post < BasePost
  has_attached_file :image,
                    :url => "/system/:test_env_number/:class/:attachment/:id/:locale/:style-:fingerprint.:extension"
  validates_attachment :image, :content_type => { :content_type => ['image/png'] }

  translates :image_file_name, :image_content_type, :image_file_size, :image_updated_at, :image_fingerprint
end

class OnlyProcessPost < BasePost
  has_attached_file :image,
                    :url => "/system/:test_env_number/:class/:attachment/:id/:locale/:style-:fingerprint.:extension",
                    :styles => { :thumb => "10x10", :large => "40x40" },
                    :only_process => [:thumb]
  validates_attachment :image, :content_type => { :content_type => ['image/png'] }

  translates :image_file_name, :image_content_type, :image_file_size, :image_updated_at, :image_fingerprint
end

class Untranslated < ActiveRecord::Base
  has_attached_file :image,
                    :url => "/system/:test_env_number/:class/:attachment/:id/:style-:fingerprint.:extension"
  validates_attachment :image, :content_type => { :content_type => ['image/png'] }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
paperclip-globalize3-2.3.0 spec/data/models.rb
paperclip-globalize3-2.2.0 spec/data/models.rb
paperclip-globalize3-2.1.0 spec/data/models.rb
paperclip-globalize3-2.0.0 spec/data/models.rb