public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
update attachment_fu plugin to get non-clashing backend/processor constant 
names

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2695 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Mon Jan 15 15:12:53 -0800 2007
commit  29cd955a55eccd3f39019256ec7ab1ea58f75528
tree    fa01498259dea26531b2af7fc11e2de6f04518f2
parent  acdfa1e0a7c7c6ec43d53a00fbc59c9e7ec7e92c
...
67
68
69
70
 
71
72
73
74
75
76
 
77
78
79
80
81
82
 
83
84
85
...
67
68
69
 
70
71
72
73
74
75
 
76
77
78
79
80
81
 
82
83
84
85
0
@@ -67,19 +67,19 @@ module Technoweenie # :nodoc:
0
           after_destroy :destroy_file
0
           extend ClassMethods
0
           include InstanceMethods
0
- include Technoweenie::AttachmentFu::Backends.const_get("#{options[:storage].to_s.classify}")
0
+ include Technoweenie::AttachmentFu::Backends.const_get("#{options[:storage].to_s.classify}Backend")
0
           case options[:processor]
0
             when :none
0
             when nil
0
               processors = Technoweenie::AttachmentFu.default_processors.dup
0
               begin
0
- include Technoweenie::AttachmentFu::Processors.const_get(processors.first) if processors.any?
0
+ include Technoweenie::AttachmentFu::Processors.const_get("#{processors.first}Processor") if processors.any?
0
               rescue LoadError, MissingSourceFile
0
                 processors.shift
0
                 retry
0
               end
0
             else
0
- include Technoweenie::AttachmentFu::Processors.const_get("#{options[:processor].to_s.classify}")
0
+ include Technoweenie::AttachmentFu::Processors.const_get("#{options[:processor].to_s.classify}Processor")
0
           end
0
           after_validation :process_attachment
0
         end
...
102
103
104
105
106
 
 
107
...
102
103
104
 
 
105
106
107
0
@@ -102,5 +102,5 @@ begin
0
     has_attachment :storage => :s3, :path_prefix => 'some/custom/path/prefix', :processor => :rmagick
0
     validates_as_attachment
0
   end
0
-rescue Technoweenie::AttachmentFu::Backends::S3::S3ConfigFileNotFoundError
0
-end
0
+rescue Technoweenie::AttachmentFu::Backends::S3Backend::ConfigFileNotFoundError
0
+end
0
\ No newline at end of file

Comments

    No one has commented yet.