Nested resources and ActiveResource

On the server application I have a admin controller

http://127.0.0.1:3000/admin/clients

class Admin::ClientsController < ApplicationController
before_filter :authorize
.
.
.

and this in my routes.rb:

map.namespace :admin do |admin|
admin.resources :clients
end

On the client site:

class Client < ActiveResource::Base
self.site = ‘http://127.0.0.1:3000/admin
self.user = ‘1’
self.password = ‘1’
end

What do I have to add on the client site to access the server?
I just added

map.namespace :admin do |admin|
admin.resources :clients
end

in the routes.rb file - without success.

The client only needs to access everything under /admin on the server.

Thanx

Am 18.08.2008 um 20:38 schrieb Jochen K.:

self.site = 'http://127.0.0.1:3000/admin'

in the routes.rb file - without success.

The client only needs to access everything under /admin on the server.

I just inspected the logfile:

Processing ClientsController#show (for 127.0.0.1 at 2008-08-18
20:40:44) [GET]
Session ID: a30a07484d1409d85cfb547c8694f496
Parameters: {“format”=>“xml”, “action”=>“show”, “id”=>“14”,
“controller”=>“admin/clients”}
Asked for a remote server ? true, ENV[“FERRET_USE_LOCAL_INDEX”] is
nil, looks like we are not the server
Will use remote index server which should be available at druby://
localhost:9010

As I can see the client request is correct: controller"=>"admin/clients
It’s a bit confusing to me because of the missing “admin” in the
browser’s url.

Ok.