title: Rails Devise "You need to sign in or sign up before continuing"
body: <p>everybody.</p>
  
  <p>I was using Devise for authentication in Rails 4 and got some troubles with Devise. When I enter the link: <a href="http://yourdomain.com:3000/users/edit.535db919486f611779000000" rel="nofollow noreferrer">http://yourdomain.com:3000/users/edit.535db919486f611779000000</a> , it just render the text "You need to sign in or sign up before continuing." without rendering layout, instead of redirect to login page (see attachment)</p>
  
  <p>I guess Rails understand the numeric after "edit." is format and it didn't know how to render it.</p>
  
  <p>What I want is when user enter any link without logged in, it will redirect to login page. Could anyone help me?</p>
  
  <p><img src="https://i.stack.imgur.com/eCSSL.png" alt="Layout for devise::registration#edit not render"></p>
  
  <p>With this link, it throw an unknown format exception.</p>
  
  <p><img src="https://i.stack.imgur.com/h4y7h.png" alt="Wrong format"></p>