aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/CHANGELOG2
-rw-r--r--activesupport/lib/active_support/core_ext/array/conversions.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index 47d1c3ba46..65eff81083 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -2,7 +2,7 @@
* Added Array#to_s(:db) that'll produce a comma-separated list of ids [DHH]. Example:
- Purchase.find(:all, :conditions => [ "product_id IN (?)", shop.products.to_s(:db) ])
+ Purchase.find(:all, :conditions => "product_id IN (#{shops.products.to_s(:db)})"
* Normalize classify's argument to a String so that it plays nice with Symbols. [Marcel Molina Jr.]
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