The rails realtime search engine is a simple search engine that allows you to search for a specific term in a specific model from Atricles, post , etc. It uses the [pgSearch gem] to search for the term in the database and returns the results in a realtime and save all queries in segment for only the current user.
Add this line to your application's Gemfile:
gem 'chartkick'
gem 'pg_search'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install pg_search
etc...
$ rails db:create
$ rails db:migrate
$ rails db:seed
$ rails s
$ rails > 7
$ ruby > 3.0.0
$ postgresql > 13.3
to laod the articles from newsapi.org you need a .env
file with:
API_KEY=your_api_key
then run the command:
rails db:seed
👤 Kandy Peter Kamuntu
- Github: @kandy-Peter
- Twitter: @kandy_peter
- Linkedin: Kandy Peter Kamuntu