Method: Mongoid::Fields::ClassMethods#attribute_names
- Defined in:
- lib/mongoid/fields.rb
#attribute_names ⇒ Array<String>
Returns an array of names for the attributes available on this object.
Provides the field names in an ORM-agnostic way. Rails v3.1+ uses this method to automatically wrap params in JSON requests.
454 455 456 |
# File 'lib/mongoid/fields.rb', line 454 def attribute_names fields.keys end |