Sha256: deed8c0690b31583b16eea5b83952349533a4c674c66a1cb3cecd9fbc4391ea6
Contents?: true
Size: 490 Bytes
Versions: 10
Compression:
Stored size: 490 Bytes
Contents
module Kaminari module Helpers class Tag def page_url_for(page) admin_params = @params.extract!(:admin_params) params = @params.merge(@param_name => (page <= 1 ? nil : page), :only_path => true) if admin_params.empty? @template.url_for params else symbolized_params = params.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} Rails.application.routes.url_for(symbolized_params) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems