This project is archived and is in readonly mode.

#2670 ✓invalid

Render :action doesn't honour named routes

Reported by Arj | May 18th, 2009 @ 11:47 AM | in 2.x

Given the following.

A UserSessions controller with 'New' and 'Destroy' actions and the following in the routes.rb file.

map.login "login", :controller => 'user_sessions', :action => 'new'

map.resources :user_sessions

Inside the controller a "render :action => 'new'" will always result in a URL of instead of despite map.login having a higher priority and pointing to the same controller and action.

I would have expected render to honour the route, or failing that allow the use of named routes as one of the render methods.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket