Permalink
Browse files

* Added an option :ajax => true, that will add the data-remote attri…

…bute

   to the page links
  • Loading branch information...
Ace Suares
Ace Suares committed May 29, 2011
1 parent b1a5bee commit 0574d2675155705c5daed741c6fa6475cf980445
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/will_paginate/view_helpers/link_renderer.rb
@@ -92,6 +92,9 @@ def link(text, target, attributes = {})
target = url(target)
end
attributes[:href] = target
+ if @options[:ajax]
+ attributes["data-remote"] = true
+ end
tag(:a, text, attributes)
end

0 comments on commit 0574d26

Please sign in to comment.