<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -32,7 +32,7 @@ module RecordSelect
       if params[:search] and !params[:search].strip.empty?
         tokens = params[:search].strip.split(' ')
 
-        where_clauses = record_select_config.search_on.collect { |sql| &quot;LOWER(#{sql}) LIKE ?&quot; }
+        where_clauses = record_select_config.search_on.collect { |sql| &quot;#{sql} LIKE ?&quot; }
         phrase = &quot;(#{where_clauses.join(' OR ')})&quot;
 
         sql = ([phrase] * tokens.length).join(' AND ')</diff>
      <filename>lib/record_select/conditions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,8 +8,7 @@ module RecordSelect
 
       @per_page = options[:per_page]
 
-      options[:search_on] = [options[:search_on]] if options[:search_on] and not options[:search_on].is_a? Array
-      @search_on = options[:search_on]
+      @search_on = [options[:search_on]].flatten
 
       @order_by = options[:order_by]
 
@@ -37,6 +36,7 @@ module RecordSelect
     end
 
     # A collection of fields to search. This is essentially raw SQL, so you could search on &quot;CONCAT(first_name, ' ', last_name)&quot; if you wanted to.
+    # NOTE: this does *NO* default transforms (such as LOWER()), that's left entirely up to you.
     def search_on
       @search_on ||= self.model.columns.collect{|c| c.name if [:text, :string].include? c.type}.compact
     end</diff>
      <filename>lib/record_select/config.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0cee10fbbae8a0a74efc5331d25698c191f1595b</id>
    </parent>
  </parents>
  <author>
    <name>Lance Ivy</name>
    <email>lance@cainlevy.net</email>
  </author>
  <url>http://github.com/edwinmoss/recordselect/commit/13ca8777f802d4c463d0e415443bbfe8b72abb11</url>
  <id>13ca8777f802d4c463d0e415443bbfe8b72abb11</id>
  <committed-date>2009-05-11T21:04:22-07:00</committed-date>
  <authored-date>2009-05-11T21:04:22-07:00</authored-date>
  <message>don't LOWER() the values from :search_on, but still search vs the value.downcase. on mysql this should be pure win, and on postgresql you should still be able to add LOWER() back in (with an index i hope).</message>
  <tree>94ad6843ceff75b8724922d4445313eb9cf35776</tree>
  <committer>
    <name>Lance Ivy</name>
    <email>lance@cainlevy.net</email>
  </committer>
</commit>
