problem with pagination

0 views
Skip to first unread message

nephish

unread,
Dec 31, 2006, 10:05:13 PM12/31/06
to Ruby on Rails: Talk
hello there all,

i am having a problem with pagination.
the first page looks right, but when i click a link, it redisplays the
same items, and the links at the bottom dissapear.

here is the code

def show_history
@site = Site.find(params[:id])
@history_pages, @site.status_changes =
paginate(:status_changes,
:conditions => ["site_id = ?", @site.id],
:per_page => 10)
end


# in the show_history.rhtml
<%= pagination_links(@history_pages) %>

any ideas ?

thanks

Reply all
Reply to author
Forward
0 new messages