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 !
tweak attachment_fu for better attr_accessible compatibility [rob-twf]
technoweenie (author)
Tue Mar 04 01:11:02 -0800 2008
commit  5b7d39d435a4aa2e78025fae57a2ef442fb8f981
tree    496b2bc0423400165636112b5a6bb1239945252a
parent  2772ec18227b04b3cb618748a2900a7b93b84d94
...
205
206
207
208
209
210
211
212
213
 
 
 
 
214
215
216
...
205
206
207
 
 
 
 
 
 
208
209
210
211
212
213
214
0
@@ -205,12 +205,10 @@ module Technoweenie # :nodoc:
0
       def create_or_update_thumbnail(temp_file, file_name_suffix, *size)
0
         thumbnailable? || raise(ThumbnailError.new("Can't create a thumbnail if the content type is not an image or there is no parent_id column"))
0
         returning find_or_initialize_thumbnail(file_name_suffix) do |thumb|
0
- thumb.attributes = {
0
- :content_type => content_type,
0
- :filename => thumbnail_name_for(file_name_suffix),
0
- :temp_path => temp_file,
0
- :thumbnail_resize_options => size
0
- }
0
+ thumb.content_type = content_type
0
+ thumb.filename = thumbnail_name_for(file_name_suffix)
0
+ thumb.temp_path = temp_file
0
+ thumb.thumbnail_resize_options = size
0
           callback_with_args :before_thumbnail_saved, thumb
0
           thumb.save!
0
         end

Comments

    No one has commented yet.