Class: SearchController

Inherits:
ApplicationController
  • Object
show all
Includes:
Concerns::FestivityCustomPage
Defined in:
app/controllers/search_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



4
5
6
7
8
9
# File 'app/controllers/search_controller.rb', line 4

def show
  query = params[:q].to_s
  @keyword = query
  @page_number = page_number
  @result = GoogleCustomSearch::Search.new.with_page_index(@page_number).for url_encode("#{@keyword} site:#{current_site.base_domain}")
end