Merge pull request #119 from opf/feature/rails3_fix_bug_in_queries_add_custom_fields_filters

Fix a bug in Query#add_custom_fields_filters
pull/115/merge
Christian Rijke 12 years ago
commit 1cb241048b
  1. 3
      app/models/query.rb

@ -601,7 +601,8 @@ class Query < ActiveRecord::Base
end
def add_custom_fields_filters(custom_fields)
@available_filters ||= {}
available_filters # compute default available_filters
return available_filters if available_filters.any? { |key, _| key.starts_with? 'cf_' }
custom_fields.select(&:is_filter?).each do |field|
case field.field_format

Loading…
Cancel
Save