Skip to content

Commit

Permalink
Code review recycle
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Swanson committed Apr 23, 2014
1 parent ca84bb5 commit 33b7a93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions db/migrate/20140421224454_fix_invalid_unicode.rb
@@ -1,8 +1,8 @@
class FixInvalidUnicode < ActiveRecord::Migration
def up
Story.all.each do |story|
story.body = story.body.gsub(/[^[:print:]]/, '')
story.save
Story.find_each do |story|
valid_body = story.body.gsub("\u2028", '').gsub("\u2029", '')
story.update_attribute(:body, valid_body)
end
end

Expand Down

0 comments on commit 33b7a93

Please sign in to comment.