```ruby
class HomeController < ApplicationController
  def index
  end

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

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

Use method search_by_ingredients in search
user
```ruby
class HomeController < ApplicationController
  def index
  end

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

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