You can read the blog here
$ git clone git@github.com:coolprobn/rails-search-engine.git
$ cd rails-search-engine
$ bundle install
From command line:
rails db:setup
This will create database, load the schema and seed the database with code inside db/seeds.rb
Go to rails console rails c
and check the count of all records, you should have 2 authors, 5 categories and 4 articles.
Commands:
> Author.count
=> 2
> Article.count
=> 4
> Category.count
=> 5
Fully working code is in the branch app-search
.
You can find the pull request with the changes for app-search here