Module: PgSearch::ScopeOptions::PgSearchRankTableAliasing

Defined in:
lib/pg_search/scope_options.rb

Instance Method Summary collapse

Instance Method Details

#pg_search_rank_table_alias(include_counter: false) ⇒ Object



61
62
63
64
65
66
67
68
69
# File 'lib/pg_search/scope_options.rb', line 61

def pg_search_rank_table_alias(include_counter: false)
  components = [arel_table.name]
  if include_counter
    count = increment_counter
    components << count if count > 0
  end

  Configuration.alias(components)
end