Class: ActiveModel::MongoidSerializer
- Inherits:
-
Serializer
- Object
- Serializer
- ActiveModel::MongoidSerializer
- Defined in:
- lib/mongoid/serializer.rb
Instance Method Summary collapse
Instance Method Details
#id ⇒ Object
22 23 24 |
# File 'lib/mongoid/serializer.rb', line 22 def id object._id end |
#status ⇒ Object
26 27 28 29 |
# File 'lib/mongoid/serializer.rb', line 26 def status return 204 if object.respond_to?(:destroyed?) && object.destroyed? return 201 if object.respond_to?(:created?) && object.created? end |