Class: Remotty::UserSerializer
- Inherits:
-
ActiveModel::Serializer
- Object
- ActiveModel::Serializer
- Remotty::UserSerializer
- Defined in:
- app/serializers/remotty/user_serializer.rb
Overview
user serializer
column
-
id
-
name
-
email
-
use_password
-
avatar
-
original
-
small
-
thumb
-
-
auth_token
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#avatar ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/serializers/remotty/user_serializer.rb', line 17 def avatar { original:object.avatar.url, small:object.avatar.url(:small), thumb:object.avatar.url(:thumb) } end |
#include_auth_token? ⇒ Boolean
25 26 27 |
# File 'app/serializers/remotty/user_serializer.rb', line 25 def include_auth_token? object.auth_token end |