Rails: Authlogic failed login URL?
On a vanilla Authlogic install set up a la Ryan Bate's Railscast #16开发者_JS百科0, when a user goes to login and the session FAILS, the url changes from
/login
to
/user_session
(Of course, it shows the validation errors and all that jazz.)
I want to keep the URL always at /login
, even on failure (and still display the login errors). How would I accomplish this?
PS - You can see this in his Railscast; scrub to 9:33 and watch the URL change on a failure.
Found the routing solution here: Use custom route upon model validation failure
Shame on me for not searching more thoroughly. Any other suggestions welcome, though, as I'm not crazy about the extra routes...
精彩评论