I tried the following code but it doesn't work
class BlogsController < ApplicationController
def index
#@entry_pages = Paginator.new(self, Entry.count, 10, params[:page])
@entries = Entry.find(:all,
#:limit => @entry_pages.items_per_page,
#:offset => @entry_pages.current.offset,
:order => 'entries.created_at DESC',
:include => :user)
end
end
This is the blog view
<h1>Recently updated blogs</h1>
<% @entries.each do |entry| %>
<p>
<%= link_to entry.user.username, entries_url(:user_id => entry.user) %><br />
'<%= entry.title %>' was posted <%= time_ago_in_words(entry.created_at) %> ago
</p>
<% end %>
I want the items to be paginated like this:
<< [1][2][3] >>