class WillPaginate::Hanami::LinkRenderer

Protected Instance Methods

build_query(params) click to toggle source
# File lib/will_paginate/view_helpers/hanami.rb, line 31
def build_query(params)
  Rack::Utils.build_nested_query params
end
request_env() click to toggle source
# File lib/will_paginate/view_helpers/hanami.rb, line 27
def request_env
  @template.params.env
end
url(page) click to toggle source
# File lib/will_paginate/view_helpers/hanami.rb, line 20
def url(page)
  str = File.join(request_env['SCRIPT_NAME'].to_s, request_env['PATH_INFO'])
  params = request_env['rack.request.query_hash'].merge(param_name.to_s => page.to_s)
  params.update @options[:params] if @options[:params]
  str << '?' << build_query(params)
end