Refactor update_all statements in order to prevent deprecation warnings in Rails 4

This commit is contained in:
Stephan Kaag
2013-07-01 20:45:52 +02:00
parent 5770879472
commit 89b621d31a
18 changed files with 45 additions and 50 deletions

View File

@@ -1,9 +1,9 @@
class ChangeSupressToSuppress < ActiveRecord::Migration
def up
SiteSetting.update_all({name: "supress_reply_directly_below"}, name: "suppress_reply_directly_below")
SiteSetting.where(name: "suppress_reply_directly_below").update_all({name: "supress_reply_directly_below"})
end
def down
SiteSetting.update_all({name: "suppress_reply_directly_below"}, name: "supress_reply_directly_below")
SiteSetting.where(name: "supress_reply_directly_below").update_all({name: "suppress_reply_directly_below"})
end
end