Class: ReplySerializer

Inherits:
BaseSerializer show all
Defined in:
app/serializers/reply_serializer.rb

Direct Known Subclasses

ReplyDetailSerializer

Instance Method Summary collapse

Methods inherited from BaseSerializer

#abilities, #cache, #can?, #current_ability, #owner?

Instance Method Details

#deletedObject


9
10
11
# File 'app/serializers/reply_serializer.rb', line 9

def deleted
  !object.deleted_at.nil?
end

#userObject


5
6
7
# File 'app/serializers/reply_serializer.rb', line 5

def user
  UserSerializer.new(object.user, root: false)
end