X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/970e1a99d7dce64f0631e88c5b9f060fb48d75fe..f435fce007d7817bd35f3beb93f0e3a844446154:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index e6d7a4e46..3d5e71ea2 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -94,7 +94,7 @@ class User < ActiveRecord::Base user = nil end - token.update_column(:expiry, 1.week.from_now) if token && user + token.update(:expiry => 1.week.from_now) if token && user user end @@ -233,7 +233,7 @@ class User < ActiveRecord::Base # perform a spam check on a user def spam_check if status == "active" && spam_score > SPAM_THRESHOLD - update_column(:status, "suspended") + update(:status => "suspended") end end