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



58
59
60
61
62
63
64
65
66
# File 'lib/pg_search/scope_options.rb', line 58

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