mobile_pagination ========= [](https://codeclimate.com/github/primedia/mobile_pagination) [](https://travis-ci.org/primedia/mobile_pagination) [](https://coveralls.io/r/primedia/mobile_pagination?branch=dev) [](https://gemnasium.com/primedia/mobile_pagination) [](http://badge.fury.io/rb/mobile_pagination) ## Requirements ... ## Installation Add this line to your application's Gemfile: gem 'mobile_pagination' And then execute: $ bundle Or install it yourself as: $ gem install mobile_pagination ## Usage Initializes with 4 options: `current_page, total_pages, query, path` ```ruby # in your view, you may have something like this: ol = pagination # in your helpers, you might have something like: require 'mobile_pagination' # http://local.m.newhomeguide.com/New-Homes/Georgia/Atlanta/?page=2 def opts { :current_page => params[:page], # => 2 :total_pages => total_pages, # => Int for total pages :query => request.query_string, # => 'page=2' :path => request.path # => '/New-Homes/Georgia/Atlanta/' } end def pagination MobilePagination::Paginate.new(opts).html end ``` ### Overrides If you don't like list items, you will need to override `MobilePagination::Templates` Just add this to the bottom of one of your view helpers: ```ruby module MobilePagination module Templates def first_page_html "
" end def previous_page_html "