Last active
August 29, 2015 14:02
-
-
Save srt32/3f090296e76a77987d04 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SearchesController < ApplicationController | |
def index | |
@tools = Tool.search do | |
keywords params[:query] | |
end.results | |
@inventories = Inventory.search do | |
keywords params[:query] | |
end.results | |
respond_to do |format| ## format is defined here | |
format.html { render template: "tools#index" } | |
end | |
end | |
end | |
### Routes | |
resources :searches, only: [:index] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment