##// END OF EJS Templates
tagged version 3.2.4...
tagged version 3.2.4 git-svn-id: http://svn.redmine.org/redmine/tags/3.2.4@15903 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r11900:e7931941a7a3
r15521:a6765ece867e 3.2.4
Show More
20130911193200_remove_eols_from_attachments_filename.rb
12 lines | 354 B | text/x-ruby | RubyLexer
/ db / migrate / 20130911193200_remove_eols_from_attachments_filename.rb
class RemoveEolsFromAttachmentsFilename < ActiveRecord::Migration
def up
Attachment.where("filename like ? or filename like ?", "%\r%", "%\n%").each do |attachment|
filename = attachment.filename.to_s.tr("\r\n", "_")
Attachment.where(:id => attachment.id).update_all(:filename => filename)
end
end
def down
# nop
end
end