Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Render :action doesn't honour named routes

#2670

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 http://example.com/user_sessions/new instead of http://example.com/login 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.

Reported by Arj · May 18th, 2009 @ 11:47 AM

State: invalid
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to invalid

    That's expected behaviour.

    May 18th, 2009 @ 12:29 PM