Method: Muster::Strategies::Pagination#parse_page
- Defined in:
- lib/muster/strategies/pagination.rb
#parse_page(parameters) ⇒ Fixnum (protected)
Returns the current page for the current query string.
If page is not specified, or is not a positive number, 1 will be returned instead.
83 84 85 86 87 |
# File 'lib/muster/strategies/pagination.rb', line 83 def parse_page(parameters) page = parameters.delete(:page).to_i page = 1 unless page > 0 page end |