Hi all,
I have a couple of restful controller. I use path_prefix to add a
string to the path.
I have a club controller and model and it’s the club id I want in
the :path_prefix
in my routes I have:
map.resources :clubs
map.resources :users, :path_prefix => :club
map.resources :posts, :path_prefix => :club
map.resources :user, :path_prefix => :club
map.connect ‘:club/’, :controller => ‘club’, :action => ‘index’
map.connect ‘:club/:controller/:action/:id’
map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’
I read the :club parameter in in application controller. Everytime a
user enters a url I thus set the club id eg. www.domain.com/zero/posts
sets the club id to zero.
When I use new_post_path I don’t get www.domain.com/zero/posts/new but
www.domain.com/club/posts/new
Someone has an idea what I do wrong?
Regards,
Stijn