lib/looksist/hashed.rb in looksist-0.3.11 vs lib/looksist/hashed.rb in looksist-0.3.12

- old
+ new

@@ -159,10 +159,15 @@ parsed_key = JSON.parse(values[elt.with_indifferent_access[using]] || '{}').deep_symbolize_keys elt[alias_method] = parsed_key[_key] end else alias_method = find_alias(as, populate) - elt[alias_method] = values[elt.with_indifferent_access[using]] + begin + json = JSON.parse(values[elt.with_indifferent_access[using]]) + elt[alias_method] = json.with_indifferent_access[populate] + rescue + elt[alias_method] = values[elt.with_indifferent_access[using]] + end end end def __entity__(entity)