aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/array
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-06-01 00:43:02 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-06-01 00:43:02 +0000
commit9fcc0654c37772a3d6884c5d6f7099a39fe88f73 (patch)
treead4da3182056c22fac7492f315e5d71cee514b29 /activesupport/lib/active_support/core_ext/array
parent24a5a803f3d01d1b6d72e1fb22a97b3922848cae (diff)
downloadrails-9fcc0654c37772a3d6884c5d6f7099a39fe88f73.tar.gz
rails-9fcc0654c37772a3d6884c5d6f7099a39fe88f73.tar.bz2
rails-9fcc0654c37772a3d6884c5d6f7099a39fe88f73.zip
Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would fail if collection was empty [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/array')
-rw-r--r--activesupport/lib/active_support/core_ext/array/conversions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb
index 7ccc63b31d..35d010b164 100644
--- a/activesupport/lib/active_support/core_ext/array/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/array/conversions.rb
@@ -35,7 +35,7 @@ module ActiveSupport #:nodoc:
case format
when :db
if respond_to?(:empty?) && self.empty?
- "0"
+ "null"
else
collect { |element| element.id }.join(",")
end