README.md in simple_paginate-0.0.2 vs README.md in simple_paginate-0.1.0
- old
+ new
@@ -38,27 +38,23 @@
### Query Basics
```
## perform a paginate query:
-@users = User.paginate(:page => params[:page])
+@users = User.paginate(:page => params[:page], :per_page => params[:per_page])
-# or, use page and per scope:
-@users = User.page(params[:page]).per(25)
-```
+### Helpers
-### Helpers
-
```
## render previous page link:
<%= link_to_previous_page @users, 'Previous' %>
## render next page link:
<%= link_to_next_page @users, 'Next' %>
## render previous page link and next page link
-<%= simple_paginate @users
+<%= simple_paginate @users %>
```
### General configuration options
You can configure the following default values by overriding these values using SimplePaginate.configure method.
@@ -76,10 +72,10 @@
### Customizing the pagination helper
SimplePaginate includes a handy template generator, To edit your paginator, run the generator first:
```
-% rails g simple_paginate:views
+% rails g simple_paginate:views
```
### Contribute
To run the test suite locally: