Class: MongoidNestedFields::NestedFieldHolder
- Inherits:
-
Object
- Object
- MongoidNestedFields::NestedFieldHolder
- Defined in:
- lib/mongoid_nested_fields/nested_field_holder.rb
Class Method Summary collapse
Class Method Details
.get(value) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/mongoid_nested_fields/nested_field_holder.rb', line 5 def self.get(value) if value.is_a? Array value = value.map do |v| if((v.is_a?(Hash) or v.is_a?(BSON::OrderedHash)) and !v['_type'].nil?) v = v['_type'].classify.constantize.new(v.to_hash) end v end end value end |
.set(value) ⇒ Object
17 18 19 |
# File 'lib/mongoid_nested_fields/nested_field_holder.rb', line 17 def self.set(value) value end |