Class: Gemgento::SearchController

Inherits:
ApplicationController show all
Defined in:
app/controllers/gemgento/search_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
9
10
11
12
13
# File 'app/controllers/gemgento/search_controller.rb', line 6

def index
  @results = Gemgento::Search.products(params[:query]).active

  respond_to do |format|
    format.html
    format.json { render json: @results }
  end
end