aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2016-04-16 09:56:29 +0000
committerYasuo Honda <yasuo.honda@gmail.com>2016-04-16 10:02:49 +0000
commit8a4a8b2acad261dc82682773e83af901b838de3e (patch)
tree6b2da56f92eebdda19e99e0dacc1b63c5ebf5c4e /activerecord/lib
parent39e087cbf5628ecc351fc86a3a1e320be193bf29 (diff)
downloadrails-8a4a8b2acad261dc82682773e83af901b838de3e.tar.gz
rails-8a4a8b2acad261dc82682773e83af901b838de3e.tar.bz2
rails-8a4a8b2acad261dc82682773e83af901b838de3e.zip
Address ORA-00923 error by quoting a reserved word "SIZE"
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/collection_cache_key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/collection_cache_key.rb b/activerecord/lib/active_record/collection_cache_key.rb
index 5dcc98424a..8d41c0d799 100644
--- a/activerecord/lib/active_record/collection_cache_key.rb
+++ b/activerecord/lib/active_record/collection_cache_key.rb
@@ -16,7 +16,7 @@ module ActiveRecord
query = collection
.unscope(:select)
- .select("COUNT(*) AS size", "MAX(#{column}) AS timestamp")
+ .select("COUNT(*) AS #{connection.quote_column_name("size")}", "MAX(#{column}) AS timestamp")
.unscope(:order)
result = connection.select_one(query)