Edge Rails: Nested resources and the new url_for


recently simply_helpful has been integrated into edge rails, and url_for now supports array for nested resources.

So I can specify this: remote_form_for([@effort.user,@effort]) for a route like /users/x/ efforts

however, this looks for "efforts_url"

there was a patch that also automatically generates name_prefixes for nested resources, with the form user_efforts_... which is very handy.

now, if I want to use both advantages, I would have to specify two paths:

map.resources :users do |users| users.resources :efforts, :collection => { :subpage => :get }, :name_prefix => nil users.resources :efforts, :collection => { :subpage => :get } end

is there a way to solve this? eg. let url_for use the name prefix too?

thanks, christoph

Prepend the symbol of the namespace as the first arg of the array:

url_for [:my_namespace, @parent_object, @child_object]