Skip to content

Rails APIs which demonstrate the working of http verbs , authentication using devise gem, koala fb authentication, pagination using kaminari gem etc.

Notifications You must be signed in to change notification settings

vaibhavbuccha/Rails-APIs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Add Kaminari for pagination

some basic queries for pagination

# get records according to pages
 Post.page(page_no) 
# default limit is 11 and offset is 25

post = Post.page(2).per(5)

# per is used for set per page counts of posts

Post.count # it will show the total count of posts

post.total_count  # it will show the total count of posts
post.total_pages # it will show the total pages of posts

post.next_page  # it will give the next page count
post.current_page # it will give the current page number
post.prev_page  # it will give the previous page number
post.last_page? # it tails that current page is last page or not 
post.first_page? # it will tails that trhe current page is first page or not

About

Rails APIs which demonstrate the working of http verbs , authentication using devise gem, koala fb authentication, pagination using kaminari gem etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published