Permalink
Browse files

Replacing \w with A-Za-z since Ruby 1.9's regexps match utf character…

…s with \w
  • Loading branch information...
1 parent 318d0b2 commit 076cd00749f93d4b2cadfc929c5d92dc02d44b2a @qrush qrush committed Jun 30, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/paperclip/attachment.rb
@@ -77,7 +77,7 @@ def assign uploaded_file
return nil if uploaded_file.nil?
@queued_for_write[:original] = uploaded_file.to_tempfile
- instance_write(:file_name, uploaded_file.original_filename.strip.gsub(/[^\w\d\.\-]+/, '_'))
+ instance_write(:file_name, uploaded_file.original_filename.strip.gsub(/[^A-Za-z\d\.\-_]+/, '_'))
instance_write(:content_type, uploaded_file.content_type.to_s.strip)
instance_write(:file_size, uploaded_file.size.to_i)
instance_write(:updated_at, Time.now)

0 comments on commit 076cd00

Please sign in to comment.