We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 914c512 commit 6a1e933Copy full SHA for 6a1e933
lib/arjdbc/postgresql/adapter.rb
@@ -825,10 +825,8 @@ def quote(value, column = nil)
825
when String
826
return "E'#{escape_bytea(value)}'::bytea" if column.type == :binary
827
return "xml '#{quote_string(value)}'" if column.type == :xml
828
- if column.respond_to?(:sql_type) && column.sql_type[0, 3] == 'bit'
829
- quote_bit(value)
830
- else super
831
- end
+ sql_type = column.respond_to?(:sql_type) && column.sql_type
+ sql_type && sql_type[0, 3] == 'bit' ? quote_bit(value) : super
832
when Array
833
if AR4_COMPAT && column.array? # will be always falsy in AR < 4.0
834
column_class = ::ActiveRecord::ConnectionAdapters::PostgreSQLColumn
0 commit comments