Permalink
Browse files

Document the bind return

  • Loading branch information...
1 parent aba688e commit df0edafac9eb47cd971970a9e7b13a3eaddf214e @rafaelfranca rafaelfranca committed Nov 9, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
View
3 activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
@@ -112,6 +112,9 @@ def type_cast(value, column, array_member = false)
end
when String
if 'bytea' == column.sql_type
+ # Return a bind param hash with format as binary.
+ # See http://deveiate.org/code/pg/PGconn.html#method-i-exec_prepared-doc
+ # for more information
{ value: value, format: 1 }
else
super(value, column)

0 comments on commit df0edaf

Please sign in to comment.