I have a button that takes to another screen, but if the user is not logged in the system it should redirect to the login screen and not to the one that is already going. Can you do it right on link_to?
li= link_to 'Anuncie', new_subscription_path, class: "button"