Special case to serialize the object.
Convert to a selection.
field.selection(object)
Parameters:
object to convert.
Returns:
The converted object.
Since:
2.4.0
20 21 22 23
# File 'lib/mongoid/fields/internal/string.rb', line 20 def selection(object) return object if object.is_a?(::Hash) serialize(object) end