Class: FlowPagination::LinkRenderer

Inherits:
WillPaginate::LinkRenderer
  • Object
show all
Defined in:
lib/flow_pagination.rb

Overview

FlowPagination renderer for (Mislav) WillPaginate Plugin

Instance Method Summary collapse

Instance Method Details

#to_htmlObject

Render flow navigation



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/flow_pagination.rb', line 7

def to_html
  flow_pagination = ''

  if self.current_page < self.last_page
    flow_pagination = @template.link_to_remote(
        @template.t('flow_pagination.link', :default => 'more'),
        :url => url_for(self.next_page),
        :method => @template.request.request_method)
  end

  @template.(:div, flow_pagination, :id => 'flow_pagination')

end