Module: Pagination::RecordFirstForHelper
- Includes:
- CurrentPageForHelper, PageSizeForHelper
- Included in:
- RecordRangeForHelper
- Defined in:
- lib/action_set/helpers/pagination/record_first_for_helper.rb
Instance Method Summary collapse
Methods included from PageSizeForHelper
Methods included from CurrentPageForHelper
Instance Method Details
#pagination_record_first_for(set) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/action_set/helpers/pagination/record_first_for_helper.rb', line 11 def pagination_record_first_for(set) current_page = pagination_current_page_for(set) page_size = pagination_page_size_for(set) return 1 if current_page == 1 ((current_page - 1) * page_size) + 1 end |