Forum: Ruby on Rails Pagination is ignoring my RESTful routes?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
18989f5699fa8619c8e9b301b6cb5088?d=identicon&s=25 BraveDave (Guest)
on 2007-06-07 20:29
(Received via mailing list)
My routes for parent = project and child = portal looks like this:
  map.resources :projects do |projects|
    projects.resources :portals, :name_prefix => "project_"

In my portals=index I have the following Pagination code that's always
worked for me.
    @portal_pages = self, @project.portals.count, 3,
    @portals = @project.portals.find :all,
       :order  => 'description',
       :limit  =>  @portal_pages.items_per_page,
       :offset =>  @portal_pages.current.offset

The code at the bottom of the portal.index view is
<%= link_to 'Previous page', { :page =>
@portal_pages.current.previous } if @portal_pages.current.previous %>
<%= link_to 'Next page', { :page => } if %>

My index view displays the first page correctly displaying this route:
When I click the NEXT button a NON-nested route is called that
'coughs' as the parent is nowhere to be found (as shown)

Shouldn't the route that is built be
The error displayed = Error = ActiveRecord::RecordNotFound in
Couldn't find Project without an ID
Is there a special Paginator object for nested RESTful routes?
This topic is locked and can not be replied to.