In my applications routes.rb I have defined three routes like the following
map.signup '/signup', :controller => 'users', :action => 'new'
map.login '/login', :controller => 'sessions', :action => 'new'
map.logout '/logout', :controller => 'sessions', :action => 'destroy'
Is it possible for me to get the controller and action name for a particular path?
I am looking for some method like this...
def current_routes(a)
end
should return :controller => 'users', :action => 'new'
if I call current_routes('signup_path')