class HomeController < ApplicationController
  def index
  end

  def search
    @query = params[:query].blank? ? '*' : params[:query]

    @recipes = Recipe.search @query
  end
end

class HomeController < ApplicationController
  def index
  end

  def search
    @query = params[:query].presence || '*'

    @recipes = Recipe.search @query
  end
end

Rewrite query handling in a more idiomatic way
Rewrite query handling in a more idiomatic way
