spec/data/models.rb in paperclip-globalize3-0.1.0 vs spec/data/models.rb in paperclip-globalize3-1.0.0
- old
+ new
@@ -1,7 +1,20 @@
-class Post < ActiveRecord::Base
+class BasePost < ActiveRecord::Base
+ self.table_name = 'posts'
+end
+
+class Post < BasePost
has_attached_file :image,
:url => "/system/:class/:attachment/:id/:locale/:style-:fingerprint.:extension"
+
+ 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/:class/:attachment/:id/:locale/:style-:fingerprint.:extension",
+ :styles => { :thumb => "10x10", :large => "40x40" },
+ :only_process => [:thumb]
translates :image_file_name, :image_content_type, :image_file_size, :image_updated_at, :image_fingerprint
end
class Untranslated < ActiveRecord::Base