Permalink
Browse files

add extra_attributes option that adds extra attributes to links.

This is a generalization of of issue #133.  Not all ajax frameworks
work the same was as rails ujs.
  • Loading branch information...
1 parent e9f872e commit 9f711f148981e79b265969f83a103a93bc345d1f @bryanlarsen committed Mar 2, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/will_paginate/view_helpers/link_renderer.rb
@@ -93,6 +93,7 @@ def link(text, target, attributes = {})
target = url(target)
end
attributes[:href] = target
+ attributes = @options[:extra_attributes].merge(attributes) if @options[:extra_attributes]
tag(:a, text, attributes)
end

0 comments on commit 9f711f1

Please sign in to comment.