Currently i am upgrading my application to rails 4.after upgrading will paginate with RemoteLinkRenderer not working. without RemoteLinkRenderer (mean without ajax) its working as normal href.
code:
<%=will_paginate task_stage_list, :renderer => 'RemoteLinkRenderer', :page_links => true, :previous_label => "Previous", :next_label =>"Next" %>
and i have helper named remote_link_renderer in helper folder.
class RemoteLinkRenderer < WillPaginate::ViewHelpers::LinkRenderer
def link(text, target, attributes = {})
if target.is_a? Fixnum
attributes[:rel] = rel_value(target)
target = url(target)
end
attributes["data-remote"] = "true"
attributes[:href] = target
tag(:a, text, attributes)
end
end