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
Search Repo:
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  9c610fccc09a0ea54393685b10d27f93c53baf8c
tree    4cb24aeccdc69501560e2daa138e6529c3bee9ab
parent  b9b07612fbb61a73530bd0920ef62ddbddfb2aa7
...
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 @@
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.