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 !
remove tabs
technoweenie (author)
Mon Jun 09 06:40:14 -0700 2008
commit  e475cf78a49ede1ba6c83fdae7028d7d9da4cd85
tree    fbb3baef5578762560b8587fcc2bf7d93f641859
parent  8a1e64917001305ba401785ce2682ac1b336365e
...
34
35
36
37
38
39
40
 
 
 
 
41
42
43
...
34
35
36
 
 
 
 
37
38
39
40
41
42
43
0
@@ -34,10 +34,10 @@ module Technoweenie # :nodoc:
0
         # by default paritions files into directories e.g. 0000/0001/image.jpg
0
         # to turn this off set :partition => false
0
         def partitioned_path(*args)
0
- if respond_to?(:attachment_options) && attachment_options[:partition] == false
0
- args
0
- else
0
- ("%08d" % attachment_path_id).scan(/..../) + args
0
+ if respond_to?(:attachment_options) && attachment_options[:partition] == false
0
+ args
0
+ else
0
+ ("%08d" % attachment_path_id).scan(/..../) + args
0
           end
0
         end
0
       

Comments

    No one has commented yet.