map.resources and link confusion

I have:

class Booking < ActiveRecord::Base
   belongs_to :guest
class Guest < ActiveRecord::Base
   has_many :bookings

map.resources :guests, :has_many => [:bookings]


before_filter :load_user

def load_user
  @guest = Guest.find(params[:guest_id])

So I can do something like: fine.

But now

does not work any longer!

ActiveRecord::RecordNotFound in BookingsController#index
Couldn't find Guest without an ID

What am I missing?

That's because u have defined nested routes and it will not handle
that URL. It needs the parent id. Do rake routes to get the list of
URL helper methods. U need to define route that will handle it.