public
Description: Treat an ActiveRecord model as a file attachment, storing its patch, size, content type, etc.
Homepage: http://weblog.techno-weenie.net
Clone URL: git://github.com/technoweenie/attachment_fu.git
Click here to lend your support to: attachment_fu and make a donation at www.pledgie.com !
ActionController::TestUploadedFile should respond to #size
technoweenie (author)
Tue Sep 30 18:04:07 -0700 2008
commit  31a44f58b2a12917a2d4c1fdcee7e95dfc48e7a2
tree    33b82839913abf53e7d950f29cc324d909e9321e
parent  a23522101f11788b68d14e4a383c03dfb19e3839
...
8
9
10
11
12
 
 
 
 
 
 
 
...
8
9
10
 
11
12
13
14
15
16
17
18
0
@@ -8,4 +8,10 @@ end
0
 config.to_prepare do
0
   AttachmentFu.setup ActiveRecord::Base
0
   AttachmentFu.reset
0
-end
0
\ No newline at end of file
0
+end
0
+
0
+class ActionController::TestUploadedFile
0
+ def respond_to?(*args)
0
+ super || @tempfile.respond_to?(*args)
0
+ end
0
+end

Comments

    No one has commented yet.