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

Version Path
trusty-festivity-extension-2.6.3 app/controllers/search_controller.rb
trusty-festivity-extension-2.6.2 app/controllers/search_controller.rb
trusty-festivity-extension-2.6.1 app/controllers/search_controller.rb
trusty-festivity-extension-2.6 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.19 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.18 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.17 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.16 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.15 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.14 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.13 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.12 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.11 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.10 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.9 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.8 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.7 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.6 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.5 app/controllers/search_controller.rb
trusty-festivity-extension-2.5.4 app/controllers/search_controller.rb