From fae7311b9c01aa07e7c0851bb602698e4f05273b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 11 Jul 2005 07:49:56 +0000 Subject: Fixed that auto_complete_for didn't force the input string to lower case even as the db comparison was git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1815 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/auto_complete.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') 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

not

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) -- cgit v1.2.3