lib/rest_model/key/property.rb in rest_model-0.1.24 vs lib/rest_model/key/property.rb in rest_model-0.2.0

- old
+ new

@@ -14,9 +14,11 @@ @serializer = options.fetch(:type, Serialization::String) @translation = Source::Translation.new(options) end def from_hash(value, resource = nil) + serializer == Serialization::String ? value : serializer.serialize(value) + rescue value end end end