Permalink
Browse files

Fixed a bug with the retrieval/setting of the downloaded image's name.

  • Loading branch information...
1 parent 19ba838 commit 8da2f01bb3a7853470b76e18665e284e8694b42e @aantix committed Nov 26, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sex_it_up.rb
View
2 lib/sex_it_up.rb
@@ -76,7 +76,7 @@ def self.cache(search_term, img_url)
# The original_filename passed in from a file open is unintelligible;
# change it to something better. Feels 'dirty' but admittance is the first step.
- def image.original_filename; base_uri.path.split('/').last; end
+ def image.original_filename; CGI.unescape(base_uri.path.split('/').last); end
image.original_filename.blank? ? nil : image
SexItUpImage.create!(:image_original_url => img_url,

0 comments on commit 8da2f01

Please sign in to comment.