lib/active_scaffold/finder.rb in active_scaffold-3.7.7 vs lib/active_scaffold/finder.rb in active_scaffold-3.7.8

- old
+ new

@@ -167,11 +167,15 @@ when :string, :range condition_for_range(column, value, like_pattern) when :date, :time, :datetime, :timestamp condition_for_datetime(column, value) when :select, :select_multiple, :draggable, :multi_select, :country, :usa_state, :chosen, :multi_chosen - values = Array(value).select(&:present?) - ['%<search_sql>s in (?)', values] if values.present? + if value.is_a?(Hash) + condition_for_range(column, value, like_pattern) + else + values = Array(value).select(&:present?) + ['%<search_sql>s in (?)', values] if values.present? + end else if column.text? value = column.active_record? ? column.active_record_class.sanitize_sql_like(value) : value ["%<search_sql>s #{ActiveScaffold::Finder.like_operator} ?", like_pattern.sub('?', value)] else