class SearchController < ApplicationController

  def index
    @games = Search.new(Game, params[:kw], current_user).results
  end

end
class SearchController < ApplicationController

  def index
    @games = Search.new(Game, params.fetch(:kw, ''), current_user).results
  end

end

Handle the search request even without the kw param
Handle the search request even without the kw param
