Sha256: b76a16b750cae8c1a83c381c2c4ee67e131ff047bf7b9096292e9f22d8397451
Contents?: true
Size: 481 Bytes
Versions: 20
Compression:
Stored size: 481 Bytes
Contents
class SearchController < ApplicationController include Concerns::FestivityCustomPage before_action { expires_in 1.hour, :public => true } 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 private def page_number page_number = params[:page_number] || 1 page_number.to_i end end
Version data entries
20 entries across 20 versions & 1 rubygems