How can pg_search be used?

I would like to use ransack (via ActiveAdmin) for full-text search on the model.

How can I get ransack to use pg_search to query it? I want to run queries that, among other query components, use the pg_search function.

+4
source share
1 answer

You do not need ransack to use pg_search, just merge the areas. They are designed to work together.

Here I use several different search collaboration stones:

@lessons = Lesson. by_fuzzy_name("foo"). # pg_search scope by_instructor_fullname("bob"). # pg_search scope ransack(ransack_search_options).result. #ransack scope active. # rails scope page(page) # kaminari pagination 
+3
source

All Articles