Method: ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting#quote_string

Defined in:
activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb

#quote_string(s) ⇒ Object

Quotes strings for use in SQL input.



127
128
129
130
131
# File 'activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb', line 127

def quote_string(s) # :nodoc:
  with_raw_connection(allow_retry: true, materialize_transactions: false) do |connection|
    connection.escape(s)
  end
end