开发者

Rails: Authlogic failed login URL?

开发者 https://www.devze.com 2022-12-17 08:41 出处:网络
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

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...

0

精彩评论

暂无评论...
验证码 换一张
取 消