lib/mebla/context.rb in mebla-1.1.7 vs lib/mebla/context.rb in mebla-1.1.8
- old
+ new
@@ -180,10 +180,10 @@
attrs[relation] = {}
if fields.is_a?(Array) # given multiple fields to index
fields_values = {}
fields.each do |field|
if items.attributes.keys.include?(field.to_s)
- fields_values.merge!({ field => items.attributes[fields.to_s] }) # attribute
+ fields_values.merge!({ field => items.attributes[field.to_s] }) # attribute
else
fields_values.merge!({ field => items.send(field) }) # method
end
end
attrs[relation].merge!(fields_values)
\ No newline at end of file