diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 892d5c3..da82088 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -309,7 +309,7 @@ class Attachment < ActiveRecord::Base just_filename = value.gsub(/\A.*(\\|\/)/m, '') # Finally, replace invalid characters with underscore - @filename = just_filename.gsub(/[\/\?\%\*\:\|\"\'<>\n\r]+/, '_') + just_filename.gsub(/[\/\?\%\*\:\|\"\'<>\n\r]+/, '_') end # Returns the subdirectory in which the attachment will be saved