diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-19 07:34:17 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-19 07:34:17 -0700 |
commit | d098e1c24bc145e0cc14532348436e14dc46d375 (patch) | |
tree | 8a73c28095e79591faff33a05f7c89394c65ad1c /activerecord/lib | |
parent | 1d9309a5b2391b9f839dd23a213031267d03a281 (diff) | |
parent | 0e34a7efa6992e6771d34dc8163b79dd7df52667 (diff) | |
download | rails-d098e1c24bc145e0cc14532348436e14dc46d375.tar.gz rails-d098e1c24bc145e0cc14532348436e14dc46d375.tar.bz2 rails-d098e1c24bc145e0cc14532348436e14dc46d375.zip |
Merge pull request #10264 from cconstantine/master
Postgresql array columns don't properly escape single quote strings when loading fixtures
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb | 2 |
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 6329733abc..40a3b82839 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb @@ -32,7 +32,7 @@ module ActiveRecord when 'point' then super(PostgreSQLColumn.point_to_string(value)) else if column.array - "'#{PostgreSQLColumn.array_to_string(value, column, self)}'" + "'#{PostgreSQLColumn.array_to_string(value, column, self).gsub(/'/, "''")}'" else super end |