Module | Mongoid::MultiParameterAttributes |
In: |
lib/mongoid/multi_parameter_attributes.rb
|
Adds Rails’ multi-parameter attribute support to Mongoid.
@todo: Durran: This module needs an overhaul.
Process the provided attributes casting them to their proper values if a field exists for them on the document. This will be limited to only the attributes provided in the suppied Hash so that no extra nil values get put into the document‘s attributes.
@example Process the attributes.
person.process(:title => "sir", :age => 40)
@param [ Hash ] attrs The attributes to set. @param [ Symbol ] role A role for scoped mass assignment. @param [ Boolean ] guard_protected_attributes False to skip mass assignment protection.
@since 2.0.0.rc.7