Class: WillPaginate::XmlLinkRenderer
- Inherits:
-
LinkRenderer
- Object
- LinkRenderer
- WillPaginate::XmlLinkRenderer
- Defined in:
- lib/will_paginate/view_helpers.rb
Instance Attribute Summary
Attributes inherited from LinkRenderer
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_html ⇒ Object
412 413 414 415 416 417 418 |
# File 'lib/will_paginate/view_helpers.rb', line 412 def to_html buffer = [:buffer] || "" xml = [: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 |