Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

will_paginate gem rails

## perform a paginated query:
@posts = Post.paginate(page: params[:page])

# or, use an explicit "per page" limit:
Post.paginate(page: params[:page], per_page: 30)

## render page links in the view:
<%= will_paginate @posts %>
Source by github.com #
 
PREVIOUS NEXT
Tagged: #gem #rails
ADD COMMENT
Topic
Name
5+6 =