lib/rest_model/key/embeddable/retriever.rb in rest_model-0.1.17 vs lib/rest_model/key/embeddable/retriever.rb in rest_model-0.1.18
- old
+ new
@@ -1,9 +1,10 @@
class RestModel
class Embeddable
module Retriever
def from_source(item, resource = nil)
return handle_fields(item) if fields
+
value = digg(item)
parsed_value = raw? ? value : resource_class.from_source(value)
one? ? parsed_value.first : parsed_value
end