Module: Pagination::FirstPageLinkForHelper

Includes:
CurrentPageForHelper, PathForHelper
Included in:
LinksForHelper
Defined in:
lib/action_set/helpers/pagination/first_page_link_for_helper.rb

Instance Method Summary collapse

Methods included from PathForHelper

#pagination_path_for

Methods included from Params::CurrentHelper

#current_params

Methods included from CurrentPageForHelper

#pagination_current_page_for

Instance Method Details



11
12
13
14
15
16
17
# File 'lib/action_set/helpers/pagination/first_page_link_for_helper.rb', line 11

def pagination_first_page_link_for(set)
  if pagination_current_page_for(set) > 1
    link_to('« First', pagination_path_for(1), class: 'page-link page-first')
  else
    (:span, '« First', class: 'page-link page-first disabled')
  end
end