Module: PgSearch::ScopeOptions::WithPgSearchRank
- Defined in:
- lib/pg_search/scope_options.rb
Instance Method Summary collapse
Instance Method Details
#with_pg_search_rank ⇒ Object
53 54 55 56 57 |
# File 'lib/pg_search/scope_options.rb', line 53 def with_pg_search_rank scope = self scope = scope.select("#{table_name}.*") unless scope.select_values.any? scope.select("#{pg_search_rank_table_alias}.rank AS pg_search_rank") end |