Class AdditionalLinkAttributesRenderer

  1. test/view_test.rb (view online)

Methods

public class

  1. new

public instance

  1. page_link

Public class methods

new (link_attributes = nil)
[show source]
# File test/view_test.rb, line 5
  def initialize(link_attributes = nil)
    super()
    @additional_link_attributes = link_attributes || { :default => 'true' }
  end

Public instance methods

page_link (page, text, attributes = {})
[show source]
# File test/view_test.rb, line 10
  def page_link(page, text, attributes = {})
    @template.link_to text, url_for(page), attributes.merge(@additional_link_attributes)
  end