Class: WillPaginate::XmlLinkRenderer

Inherits:
LinkRenderer show all
Defined in:
lib/will_paginate/view_helpers.rb

Instance Attribute Summary

Attributes inherited from LinkRenderer

#gap_marker

Instance Method Summary collapse

Methods inherited from LinkRenderer

#html_attributes, #initialize, #prepare

Constructor Details

This class inherits a constructor from WillPaginate::LinkRenderer

Instance Method Details

#to_htmlObject



412
413
414
415
416
417
418
# File 'lib/will_paginate/view_helpers.rb', line 412

def to_html
  buffer = options[:buffer] || ""
  xml = options[:builder] || Builder::XmlMarkup.new(:target => buffer, :indent => 2, :margin => 1)
  xml.link :rel => 'next', :href => url_for(@collection.next_page) unless @collection.next_page.nil?
  xml.link :rel => 'prev', :href => url_for(@collection.previous_page) unless @collection.previous_page.nil?
  xml.target!
end