README.md in mobile_pagination-0.0.8 vs README.md in mobile_pagination-0.0.9
- old
+ new
@@ -24,11 +24,11 @@
$ gem install mobile_pagination
## Usage
-Initializes with 4 options: `current_page, total_pages, query, path`
+Initializes with 4 options: `current_page, total_pages, query, path`.
```ruby
# in your view, you may have something like this:
ol
= pagination_html
@@ -47,19 +47,32 @@
:path => request.path # => '/New-Homes/Georgia/Atlanta/'
}
end
def pagination
- @pagination ||= MobilePagination::Paginate.new(opts).html
+ @pagination ||= MobilePagination::Paginate.new(opts)
end
def pagination_html
- pagination.html
+ pagination.html # => returns paginated elements
end
+# Other public methods
+
+previous_page_link # => path for the previous page
+next_page_link # => path for the next page
+
+previous_page? # => true or false
+next_page? # => true or false
+should_paginate? # => true or false
+
+# Readers
+current_page, total_pages query, path
```
+Take a look at lib/mobile_pagination/paginate.rb for more information.
+
### 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:
@@ -67,10 +80,10 @@
```ruby
module MobilePagination
module Templates
def first_page_html
- "<p'>
+ "<p>
<a title='First Page' href='#{first_page_link}'>Luke's Page</a> |
<p>"
end
def previous_page_html