Method: Mongoid::Extensions::Hash#extract_id
- Defined in:
- lib/mongoid/extensions/hash.rb
#extract_id ⇒ Object
Deprecated.
Get the id attribute from this hash, whether it’s prefixed with an underscore or is a symbol.
70 71 72 |
# File 'lib/mongoid/extensions/hash.rb', line 70 def extract_id self["_id"] || self[:_id] || self["id"] || self[:id] end |