diff options
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/auto_complete.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 15d84dab54..da22956572 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *1.9.1* (11 July, 2005) +* Fixed that auto_complete_for didn't force the input string to lower case even as the db comparison was + * Fixed that Action View should always use the included Builder, never attempt to require the gem, to ensure compatibility * Added that nil options are not included in tags, so tag("p", :ignore => nil) now returns <p /> not <p ignore="" /> but that tag("p", :ignore => "") still includes it #1465 [michael@schuerig.de] diff --git a/actionpack/lib/action_controller/auto_complete.rb b/actionpack/lib/action_controller/auto_complete.rb index 26e438e0fd..dc58503eb8 100644 --- a/actionpack/lib/action_controller/auto_complete.rb +++ b/actionpack/lib/action_controller/auto_complete.rb @@ -33,7 +33,7 @@ module ActionController def auto_complete_for(object, method, options = {}) define_method("auto_complete_for_#{object}_#{method}") do find_options = { - :conditions => [ "LOWER(#{method}) LIKE ?", '%' + params[object][method] + '%' ], + :conditions => [ "LOWER(#{method}) LIKE ?", '%' + params[object][method].downcase + '%' ], :order => "#{method} ASC", :limit => 10 }.merge!(options) |