This tutorial walks through how to implement search into a Rails API application. The tools I'll be using are:
Rails 5.2 API only Ruby on Rails application pg_search gem Postgres databaseStep 1 Install the pg_search Gem
gem 'pg_search'
Step 2 Run bundle install after adding the gem
Step 3 Add the Search Instructions to the Model to Search
Step 4 Call the Scope from the Controller and Return JSON