lib/administrate/search.rb in administrate-0.1.1 vs lib/administrate/search.rb in administrate-0.1.2
- old
+ new
@@ -24,12 +24,16 @@
def search_terms
["%#{term.downcase}%"] * search_attributes.count
end
def search_attributes
- resolver.dashboard_class::ATTRIBUTE_TYPES.select do |_, type|
- type.searchable?
- end.keys
+ attribute_types.keys.select do |attribute|
+ attribute_types[attribute].searchable?
+ end
+ end
+
+ def attribute_types
+ resolver.dashboard_class::ATTRIBUTE_TYPES
end
attr_reader :resolver, :term
end
end