method

quote_and_escape

rails latest stable - Class: ActiveRecord::ConnectionAdapters::PostgreSQLColumn::Cast

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.1.8) is shown here.

quote_and_escape(value)
private

No documentation available.

# File activerecord/lib/active_record/connection_adapters/postgresql/cast.rb, line 147
          def quote_and_escape(value)
            case value
            when "NULL", Numeric
              value
            else
              value = value.gsub(/\\/, ARRAY_ESCAPE)
              value.gsub!(/"/,"\\\"")
              "\"#{value}\""
            end
          end