Replace deprecated update_attribute method
This commit is contained in:
parent
5bd428015a
commit
a770d020f9
2 changed files with 4 additions and 2 deletions
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue