Flowdock
method

quote_and_escape

Importance_0
v4.2.9 - Show latest stable - 0 notes - Class: Array
quote_and_escape(value) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/array.rb, line 72
          def quote_and_escape(value)
            case value
            when ::String
              if string_requires_quoting?(value)
                value = value.gsub(/\\/, ARRAY_ESCAPE)
                value.gsub!(/"/,"\\\"")
                %("#{value}")
              else
                value
              end
            when nil then "NULL"
            when ::Date, ::DateTime, ::Time then subtype.type_cast_for_schema(value)
            else value
            end
          end
Register or log in to add new notes.