Part 4

Using Rails 4:

For the controller section at around the 40min mark, I had to use this:

class SearchesController < ApplicationController
  def show
    @search = Search.new(term: params[:search][:term])
  end
end

using [:search][:term] to parse these params:

Parameters: {"utf8"=>"✓", "search"=>{"term"=>"ruby"}, "commit"=>"Search"}

For the solr reindex method at around 55min mark, I got this
error:

NoMethodError: undefined method `attr_accessible' for TextShout(id: integer, body: string):Class

which I solved by using the ‘protected_attributes’ gem.

Also, remember to run rake sunspot:solr:stop after you’re done.