Sha256: fef8a75d1e2c61a0d4b57b7f087c242434c37187563c76a11cfac87205940a7e

Contents?: true

Size: 313 Bytes

Versions: 10

Compression:

Stored size: 313 Bytes

Contents

module PgHero
  module BaseHelper
    def pghero_pretty_ident(table, schema: nil)
      ident = table
      if schema && schema != "public"
        indent = "#{schema}.#{table}"
      end
      if ident =~ /\A[a-z0-9_]+\z/
        ident
      else
        @database.quote_ident(ident)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
pghero-2.1.0 app/helpers/pg_hero/base_helper.rb
pghero-2.0.8 app/helpers/pg_hero/base_helper.rb
pghero-2.0.7 app/helpers/pg_hero/base_helper.rb
pghero-2.0.6 app/helpers/pg_hero/base_helper.rb
pghero-2.0.5 app/helpers/pg_hero/base_helper.rb
pghero-2.0.4 app/helpers/pg_hero/base_helper.rb
pghero-2.0.3 app/helpers/pg_hero/base_helper.rb
pghero-2.0.2 app/helpers/pg_hero/base_helper.rb
pghero-2.0.1 app/helpers/pg_hero/base_helper.rb
pghero-2.0.0 app/helpers/pg_hero/base_helper.rb