aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-02 15:06:13 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-07-02 15:06:13 -0300
commitc8f017682e507ba6cb4183c29cf9398a20211d15 (patch)
tree5eebace68433643c7cb14ef0b33a8c31da0b6be4 /activerecord/lib/active_record
parent7df68a300c9395e3edf8c603b6fea3db9eaff003 (diff)
parent664feb2d002501bd4a6db42f75b2221d4b9410cc (diff)
downloadrails-c8f017682e507ba6cb4183c29cf9398a20211d15.tar.gz
rails-c8f017682e507ba6cb4183c29cf9398a20211d15.tar.bz2
rails-c8f017682e507ba6cb4183c29cf9398a20211d15.zip
Merge pull request #16022 from sgrif/sg-range-quoting
Quote range strings when quoting PG ranges
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
index cb1c67495b..60b0ee526e 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
@@ -24,7 +24,7 @@ module ActiveRecord
when Range
if /range$/ =~ sql_type
escaped = quote_string(PostgreSQLColumn.range_to_string(value))
- "#{escaped}::#{sql_type}"
+ "'#{escaped}'::#{sql_type}"
else
super
end