| Module | Kaminari::Helpers::SinatraHelpers::HelperMethods |
| In: |
lib/kaminari/helpers/sinatra_helpers.rb
|
A simple "Twitter like" pagination link that creates a link to the next page. Works on Sinatra.
Basic usage:
<%= link_to_next_page @items, 'Next Page' %>
Ajax:
<%= link_to_next_page @items, 'Next Page', :remote => true %>
By default, it renders nothing if there are no more results on the next page. You can customize this output by passing a parameter :placeholder.
<%= link_to_next_page @items, 'Next Page', :placeholder => %{<span>No More Pages</span>} %>
A simple "Twitter like" pagination link that creates a link to the previous page. Works on Sinatra.
Basic usage:
<%= link_to_previous_page @items, 'Previous Page' %>
Ajax:
<%= link_to_previous_page @items, 'Previous Page', :remote => true %>
By default, it renders nothing if there are no more results on the previous page. You can customize this output by passing a parameter :placeholder.
<%= link_to_previous_page @users, 'Previous Page', :placeholder => %{<span>At the Beginning</span>} %>
A helper that renders the pagination links - for Sinatra.
<%= paginate @articles %>