# Pagination problem

**URL:** <https://www.ruby-forum.com/t/pagination-problem/171100>\
**Category:** Rails\
**Created:** [June 26, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/pagination-problem/171100 "2009-06-26T13:19:47Z")\
**Posts on this page:** 1\
**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:** [June 26, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/pagination-problem/171100/1 "2009-06-26T13:19:47Z")

</div>

Dear all…  
i m using rails paginator class in my application.  
i can able to see my pagination working but its not providing me the  
current page number in my view  
it displays like below  
PREVIOUS 2 3 4 5 6 7 8 9 10 11 12 109 NEXT

\<% if user\_list.length \> 1 %\>  
\<%if userlist.current.previous %\>

```
<%= link_to_remote 'PREVIOUS',
                      :url => {
                        :controller => "users",
                        :action => action,
                        :type => type,
                        :page => user_list.current_page.previous,
                        :company => company } -%>

```

\<%end%\> |

\<% pagination\_links\_each(user\_list, :window\_size =\> 10 ) do |link| %\>

```
<% options = { :url => {:controller => "users",
                        :action => "search",
                        :type => type,
                        :page => link,
                        :company => company} %>

<%=link_to_remote(link.to_s, options)%>

```

\<% end%\>

\<%if user\_list.current.next%\>

```
   <%= link_to_remote 'NEXT', :url => {:controller => "users",
                        :action => "search",
                        :page => user_list.current_page.next,
                        :type => type,
                        :company => company} %>

```

\<%end%\>

i dont know how to display current page…  
Pls guide me on my issue

Thanks
