##// END OF EJS Templates
upgrade Rails to 4.2.7.1...
upgrade Rails to 4.2.7.1 git-svn-id: http://svn.redmine.org/redmine/trunk@15734 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r11900:e7931941a7a3
r15352:f710d594e3b0
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