Permalink
Browse files

Use unless for clarity

  • Loading branch information...
1 parent 3f221b2 commit 612b8cbd656b12d4ee67a5642d9454fdcbbcd67a @bensie bensie committed Feb 24, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/carrierwave/uploader/download.rb
@@ -49,7 +49,7 @@ def file
def filename_from_header
if file.meta.include? 'content-disposition'
match = file.meta['content-disposition'].match(/filename="?([^"]+)/)
- return match[ 1 ] if !match.nil? && !match[ 1 ].empty?
+ return match[1] unless match.nil? || match[1].empty?
end
end

0 comments on commit 612b8cb

Please sign in to comment.