Routing error with nested resources

Hi – I have a routes.rb file with the following in it:

map.resource :admin do |admin| admin.resources :users admin.resources :clients do |client| client.resources :client_properties end admin.resources :areas admin.resources :properties end

My problem is when I try to access the show or edit actions of the
client_properties resource.
The function client_property_path( client, property ) returns the
correct url – “/clients/1/client_properties/2” – but the routing then
fails on this with the following error:

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1273:in `raise_named_route_error': client_property_url failed to generate from {:client_id=>"2", :controller=>"client_properties", :action=>"show"}, expected: {:controller=>"client_properties", :action=>"show"}, diff: {:client_id=>"2"}

(NOTE – it seems to taking the property id as the client id.)

By my understanding there should be no cause for an error here.
Can anyone shed any light on what I’m getting wrong?
Or if maybe my understanding of how resources & nesting works is in
error, could they point that out?
& thanks in advance for any & all assistance,
Doug.

The function client_property_path( client, property ) returns the
correct url – “/clients/1/client_properties/2”…

Sorry – that should read that the correct url returned is:
“/admin/clients/1/client_properties/2”.

Doug.