Class: UserAuthTokenSerializer
Instance Method Summary
collapse
#browser, #client_ip, #device, #icon, #location, #os
expire_cache_fragment!, fragment_cache
#include!
Instance Method Details
#include_is_active? ⇒ Boolean
9
10
11
|
# File 'app/serializers/user_auth_token_serializer.rb', line 9
def include_is_active?
scope && scope.request
end
|
#is_active ⇒ Object
13
14
15
|
# File 'app/serializers/user_auth_token_serializer.rb', line 13
def is_active
scope.auth_token == object.auth_token
end
|
#seen_at ⇒ Object
17
18
19
20
21
|
# File 'app/serializers/user_auth_token_serializer.rb', line 17
def seen_at
return object.created_at if object.seen_at.blank?
object.seen_at
end
|