RailsCasts Pro episodes are now free!

Learn more or hide this

Tobias Overkamp's Profile

GitHub User: fenton42

Site: nobody-is-like.me

Comments by Tobias Overkamp

Avatar

Old thread as well, but perhaps this:
https://groups.google.com/forum/#!msg/plataformatec-devise/XFFrt4Gm-J4/NmEbV1rr8WcJ

could help you...

Short:
If you call your devise model differently (not "User" but "MyUser" for example) you have to make use of
my_user_signed_in?
resp.
current_my_user_registration_path etc. as in

html
    <div id="user_nav">
        <% if my_user_signed_in? %>
          Logged in as <strong><%= current_my_user.email %></strong>
        <%= link_to 'Edit profile', edit_my_user_registration_path %>
        <%= link_to "Logout", destroy_my_user_session_path, :method => :delete %>
      <% else %>
          <%= link_to "Sign up", new_my_user_registration_path %>
          <%= link_to "Login", new_my_user_session_path %>
      <% end %>
      </div>
Avatar

OK, kind of old thread, but I just have run into this as well.
It seems to be the 1.9 ruby syntax for Hashes.

Use
:method => :delete

instead of
method: :delete

if you are still on ruby 1.8.x