Rails error resource_name - devise help routing and rendering

resource_name is defined in the Devise generated controllers. I don't think you can include those shared links in the application layout, I think they are intended for use on the devise forms (registration,sessions,passwords,confirmations,etc), which are rendered by devise controllers.

If you want to have little login/out snippets in every page, you might want to consider writing those links yourself. For instance, if your object that you're using devise for is user, you could write this:

<%= link_to "Sign in", new_session_path(:user) %><br />

the resource_name is just the Devise abstraction for the resource you're using. I expect that if you're making this link, you know which of your authenticated objects you want to login as, so you can specify it explicitly. You could aslo run rake routes | grep sessions and see what the name of the path is and use that directly. For example:

<%= link_to "Sign in", new_user_session_path %><br />