The if statement evaluates as true, but I just see...
signed in as
user =
In other words, the current_user doesn't work either in the view or in the controller, though I have put 'before_filter :authenticate_user!' into my controller.
I am a bit mystified at this point.
Here are my software versions...
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]
Hello,I am a brand new Rails developer. I am attempting to use Devise for authentication, but I'm running into an issue.The default login seems to work. I can create a new user and then login with those credentials (email/password).I have a very simple controller for the home page that I'm using to test...class HomeController < ApplicationControllerbefore_filter :authenticate_user!def index@user = current_userendendThen in my home view I'm trying to display the user information...<% if user_signed_in? -%><p>signed in as <% current_user.id -%></p><p>user = <% @user.id -%></p><% end -%>The if statement evaluates as true, but I just see...
signed in as
user =
In other words, the current_user doesn't work either in the view or in the controller, though I have put 'before_filter :authenticate_user!' into my controller.
I am a bit mystified at this point.
Here are my software versions...
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]
rails 3.2.7devise 2.1.2I may be missing something very simple here, but my understanding is that 'current_user' should be set if 'user_signed_in' is true.Thanks for any help you can give on this.--Jeremy
--