Forum: Ruby on Rails Get name of nesting controller in route

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Cba8c8adc11ee1152eb6f15ab7071511?d=identicon&s=25 werdnativ (Guest)
on 2007-02-28 00:51
(Received via mailing list)
If I have nested resources:

map.resources 'projects' do |project|
  project.resources 'members'

When I send a request to /projects/1/members/, I can find my
controller name in my helper by calling:

=> "members"

Is there a clean way to find the controller name for the part of the
request_uri that refers to 'projects' or deeper nesting? I'm working
around this by parsing the uri string, but I'd like to know how I'd
handle this when the controller name doesn't match the name of the

This topic is locked and can not be replied to.