lib/pipekit/config.rb in pipekit-1.0.2 vs lib/pipekit/config.rb in pipekit-1.2.0
- old
+ new
@@ -44,10 +44,11 @@
#
# Config.field_value(:person, "inteview_quality", "value_not_there")
# # => "value_not_there"
def field_value(resource, field, value)
custom_field_values(resource, field)
- .fetch(value, value)
+ .reduce({}) { |result, (k,v)| result.tap { |result| result[k.to_s] = v } }
+ .fetch(value.to_s, value)
end
# Finds the Pipedrive field value ID from the config if one exists for that
# field/value
#