aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-06-13 21:51:43 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-06-13 21:51:43 +0000
commit1d9905a67f9bf00867883d3a954df3d4df90eaba (patch)
tree66565afc066cdbfe4851f4b35a13995fe5e77680 /activerecord/lib
parent2e6f6ced428f3b3b574e7f6a7e1511b2cf470039 (diff)
downloadrails-1d9905a67f9bf00867883d3a954df3d4df90eaba.tar.gz
rails-1d9905a67f9bf00867883d3a954df3d4df90eaba.tar.bz2
rails-1d9905a67f9bf00867883d3a954df3d4df90eaba.zip
r1307@iwill: jeremy | 2005-06-13 19:05:00 -0700
Ticket 1312 - Malformed habtm finder sql r1308@iwill: jeremy | 2005-06-13 19:58:48 -0700 Add a habtm with an unquoted condition to Project. r1309@iwill: jeremy | 2005-06-13 19:59:46 -0700 Space out habtm finder conditions. r1310@iwill: jeremy | 2005-06-13 20:00:16 -0700 Test habtm.find with quoted and unquoted conditions. r1311@iwill: jeremy | 2005-06-13 20:00:25 -0700 Update changelog git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
index f827cf3282..42a4f3495d 100644
--- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
+++ b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -66,7 +66,7 @@ module ActiveRecord
# Otherwise, construct a query.
else
ids_list = ids.map { |id| @owner.send(:quote, id) }.join(',')
- records = find_target(@finder_sql.sub(/(ORDER BY|$)/, "AND j.#{@association_foreign_key} IN (#{ids_list}) \\1"))
+ records = find_target(@finder_sql.sub(/(ORDER BY|$)/, " AND j.#{@association_foreign_key} IN (#{ids_list}) \\1"))
if records.size == ids.size
if ids.size == 1 and !expects_array
records.first