Navigation Menu

Skip to content

Commit

Permalink
drop PGconn requirement, the string gets quoted in the actual sql gen…
Browse files Browse the repository at this point in the history
…eration
  • Loading branch information
Joel committed Oct 12, 2011
1 parent 6d28c8d commit 691060e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion Gemfile
@@ -1,7 +1,6 @@
source "http://rubygems.org"
# Add dependencies required to use your gem here.
gem 'activerecord'
gem 'pg'
gem 'rake'

# Add dependencies to develop your gem here.
Expand Down
2 changes: 0 additions & 2 deletions Gemfile.lock
Expand Up @@ -19,7 +19,6 @@ GEM
bundler (~> 1.0)
git (>= 1.2.5)
rake
pg (0.9.0)
rake (0.9.2)
rcov (0.9.9)
rdoc (3.9.1)
Expand All @@ -33,7 +32,6 @@ DEPENDENCIES
activerecord
bundler (~> 1.0.0)
jeweler (~> 1.6.4)
pg
rake
rcov
rdoc
Expand Down
2 changes: 1 addition & 1 deletion lib/activerecord-postgres-hstore/hash.rb
Expand Up @@ -7,7 +7,7 @@ def to_hstore

map { |idx, val|
iv = [idx,val].map { |_|
e = PGconn.escape(_.to_s).gsub(/''/, "'").gsub(/"/, '\"')
e = _.to_s.gsub(/"/, '\"')
if _.nil?
'NULL'
elsif e =~ /[,\s=>]/ || e.blank?
Expand Down

0 comments on commit 691060e

Please sign in to comment.