Module: Pagify::Helper::Rails::ApplicationHelper

Included in:
ApplicationHelper
Defined in:
lib/pagify/helper/rails.rb

Instance Method Summary collapse

Instance Method Details



11
12
13
14
15
16
17
18
19
20
# File 'lib/pagify/helper/rails.rb', line 11

def pagify_links objs, &path
  path = lambda{ request.path } unless block_given?
  html = objs.pager.html
  name = html.setting[:query_name]
  type = html.setting[:links_type]
  base = path.call
  "<div class=\"#{html.setting[:wrapper_class]}\">" +
    html.send(type, params[name]){ |p| base + "?#{name}=#{p}" } +
  '</div>'
end