module Pagination::PrevPageLinkForHelper
Public Instance Methods
pagination_prev_page_link_for(set)
click to toggle source
# File lib/action_set/helpers/pagination/prev_page_link_for_helper.rb, line 13 def pagination_prev_page_link_for(set) current_page = pagination_current_page_for(set) if current_page > 1 && current_page <= pagination_total_pages_for(set) link_to('‹ Prev', pagination_path_for(current_page - 1), rel: 'prev', class: 'page-link page-prev') else content_tag(:span, '‹ Prev', class: 'page-link page-prev disabled') end end