X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2f722fc281434ef59e19c504bff9e748e9d3f4b4..4fb775d6d516857066e0d3cc86877ead3f6cae08:/app/models/user.rb?ds=sidebyside 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