Ruby on Rails #150 Global Search

09/11/2023 (6 months ago)
search sql

Global search allows you to search multiple attributes of multiple models in a single search form.

For example, on superails.com when you perform a search in the navbar you get results for Posts, Tags, Playlists.

We will build a scalable global search, so that you can easily add new models and attributes to search on.

This video topic was suggested by @Elgnonvis . Want me to do a video about a topic? Add your ideas in the ocmments.

Episode source code: https://github.com/corsego/150-global-search/commit/6c25c09caac09a14056d570f389b56303ee97470
Based on this blogpost: https://blog.corsego.com/search-multiple-models

0:00 Global Search examples
2:02 Basic global search
11:02 Advanced global search
23:30 Final demo


1
Sign in to join the conversation