```ruby
class HomeController < ApplicationController
  def index
  end

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

    @recipes = Recipe.search @query
  end
end
```

Rewrite query handling in a more idiomatic way
user
```ruby
class HomeController < ApplicationController
  def index
  end

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

    @recipes = Recipe.search @query
  end
end
```
assistant