Replace deprecated update_attribute method

This commit is contained in:
Tom Hughes 2012-07-27 12:24:44 +01:00
parent 5bd428015a
commit a770d020f9
2 changed files with 4 additions and 2 deletions

View file

@ -14,7 +14,9 @@ class OauthToken < ActiveRecord::Base
end
def invalidate!
update_attribute(:invalidated_at, Time.now)
update_attributes({
:invalidated_at => Time.now
}, :without_protection => true)
end
def authorized?

View file

@ -76,7 +76,7 @@ class User < ActiveRecord::Base
user = nil
end
token.update_attribute(:expiry, 1.week.from_now) if token and user
token.update_column(:expiry, 1.week.from_now) if token and user
return user
end