# Paginator Question

**URL:** <https://www.ruby-forum.com/t/paginator-question/185272>\
**Category:** Rails\
**Created:** [March 17, 2010, 10:21am UTC](https://www.ruby-forum.com/t/paginator-question/185272 "2010-03-17T10:21:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [March 17, 2010, 10:21am UTC](https://www.ruby-forum.com/t/paginator-question/185272/1 "2010-03-17T10:21:45Z")

</div>

Hi i using rails paginator class in my application like below

@log\_pages = Paginator.new(self, @logs.length, items\_per\_page, page)

i would like to know how can check whether the current page is last  
page or not?

Thank u for any information

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [March 17, 2010, 10:51am UTC](https://www.ruby-forum.com/t/paginator-question/185272/2 "2010-03-17T10:51:31Z")

</div>

Newb N. wrote:

> Hi i using rails paginator class in my application like below
> 
> @log\_pages = Paginator.new(self, @logs.length, items\_per\_page, page)
> 
> i would like to know how can check whether the current page is last  
> page or not?
> 
> Thank u for any information

It would be useful if you give the Paginator class definition… Is it a  
default  
function available in rails.  
I think You might be using a plugin for pagination.

If it is plugin, find whether any method is available to find the last  
page.

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [March 17, 2010, 10:57am UTC](https://www.ruby-forum.com/t/paginator-question/185272/3 "2010-03-17T10:57:33Z")

</div>

Loganathan G. wrote:

> Newb N. wrote:
> 
> > Hi i using rails paginator class in my application like below
> > 
> > @log\_pages = Paginator.new(self, @logs.length, items\_per\_page, page)
> > 
> > i would like to know how can check whether the current page is last  
> > page or not?
> > 
> > Thank u for any information
> 
> It would be useful if you give the Paginator class definition… Is it a  
> default  
> function available in rails.  
> I think You might be using a plugin for pagination.
> 
> If it is plugin, find whether any method is available to find the last  
> page.

Thanks for your response Mr.loganathan,

Actually i m using rails default paginator class.

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [March 17, 2010, 1:01pm UTC](https://www.ruby-forum.com/t/paginator-question/185272/4 "2010-03-17T13:01:12Z")

</div>

Newb N. wrote:

> Loganathan G. wrote:
> 
> > Newb N. wrote:
> > 
> > > Hi i using rails paginator class in my application like below
> > > 
> > > @log\_pages = Paginator.new(self, @logs.length, items\_per\_page, page)
> > > 
> > > i would like to know how can check whether the current page is last  
> > > page or not?
> > > 
> > > Thank u for any information
> > 
> > It would be useful if you give the Paginator class definition… Is it a  
> > default  
> > function available in rails.  
> > I think You might be using a plugin for pagination.
> > 
> > If it is plugin, find whether any method is available to find the last  
> > page.
> 
> Thanks for your response Mr.loganathan,
> 
> Actually i m using rails default paginator class.

I would recommend you the following URL to read to get to know about  
pagination available in rails:  
[http://www.nullislove.com/2007/05/24/pagination-in-rails/](http://www.nullislove.com/2007/05/24/pagination-in-rails/)

I think that In simple pagination , we can find it.
