lib/tabulatr/renderer/column.rb in tabulatr2-0.9.15 vs lib/tabulatr/renderer/column.rb in tabulatr2-0.9.16
- old
+ new
@@ -180,10 +180,14 @@
end
def determine_appropriate_filter!
case self.klass.columns_hash[self.name.to_s].try(:type)
when :integer, :float, :decimal
- self.filter = :exact
+ if self.klass.respond_to?(:defined_enums) && self.klass.defined_enums.keys.include?(self.name.to_s)
+ self.filter = :enum
+ else
+ self.filter = :exact
+ end
when :string, :text
self.filter = :like
when :date, :time, :datetime, :timestamp
self.filter = :date
when :boolean