Created
March 3, 2017 20:55
-
-
Save foxumon/c032b68d8b9df90a6ffae945a4095b04 to your computer and use it in GitHub Desktop.
Revisions
-
foxumon created this gist
Mar 3, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ a = MODEL.where("COLUMN like ?", "%SEARCH%");0 puts a.length puts " " a.all.each do |a| puts a.id end;0 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ ActiveRecord::Base.connection.execute(%q{ update TABLE set COLUMN = replace( COLUMN, 'BAD', 'GOOD' ) })