diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb index 635e60ad187da..6329733abc44c 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb @@ -103,7 +103,7 @@ def type_cast(value, column, array_member = false) PostgreSQLColumn.array_to_string(value, column, self) end when String - return super(value, column) unless 'bytea' == couln.sql_type + return super(value, column) unless 'bytea' == column.sql_type { :value => value, :format => 1 } when Hash case column.sql_type