Module: PgRls::ActiveSupport::StringExt

Defined in:
lib/pg_rls/active_support/string_ext.rb

Overview

Extensions to the String class

Instance Method Summary collapse

Instance Method Details

#sanitize_sqlObject



7
8
9
10
11
12
# File 'lib/pg_rls/active_support/string_ext.rb', line 7

def sanitize_sql
  str = dup
  str.gsub!(/[[:space:]]+/, " ")
  str.strip!
  str.to_s
end