I want to use link_to tag inside a controller.
I added include ActionView::Helpers::UrlHelper
and here is the my code.
def authenticate_user!
unless user_signed_in?
flash[:danger] ="You must sign in or sign up first!#{link_to("test", root_path) }".html_safe
redirect_to new_session_path
end
end
If I go to the browser, it shows You must sign in or sign up first!<a href="/">test</a>
Do you know how can I show this message correctly? (I mean without tag)
Thank you!