When using before_filter :login_required
to protect a particular page, the link_to_unless_current
method in the application layout template renders the "Login" link for the login page as a hyperlink instead of just text.
The "Login" text/link problem only occurs when redirected to the Login Page via the before_filter
machinery, otherwise, the link_to_unless_current
method operates as expected.
It seems that link_to_unless_current
is using the old page data as the "current" instead of the login page (when redirecting).