aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorDylan Smith <Dylan.Smith@shopify.com>2013-02-06 13:19:09 -0500
committerDylan Smith <Dylan.Smith@shopify.com>2013-02-07 04:59:33 -0500
commita712e08ebe21f6d8653a0e6602df2e0f5d40d9ca (patch)
tree7cde9049f55e039627b3cb6bfcc45e58bcadd4a8 /activerecord/CHANGELOG.md
parent1b75666f7f4ec7f013182d24b919ca27b0ca0068 (diff)
downloadrails-a712e08ebe21f6d8653a0e6602df2e0f5d40d9ca.tar.gz
rails-a712e08ebe21f6d8653a0e6602df2e0f5d40d9ca.tar.bz2
rails-a712e08ebe21f6d8653a0e6602df2e0f5d40d9ca.zip
active_record: Quote numeric values compared to string columns.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 55fa9cae81..e102adcb4d 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,15 @@
## Rails 4.0.0 (unreleased) ##
+* Quote numeric values being compared to non-numeric columns. Otherwise,
+ in some database, the string column values will be coerced to a numeric
+ allowing 0, 0.0 or false to match any string starting with a non-digit.
+
+ Example:
+
+ App.where(apikey: 0) # => SELECT * FROM users WHERE apikey = '0'
+
+ *Dylan Smith*
+
* Schema dumper supports dumping the enabled database extensions to `schema.rb`
(currently only supported by postgresql).