Module: Mongoid::Document

Defined in:
lib/locomotive/mongoid/patches.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object


116
117
118
119
120
# File 'lib/locomotive/mongoid/patches.rb', line 116

def as_json(options = {})
  attrs = super(options)
  attrs['id'] = attrs['_id']
  attrs
end