Take the 2-minute tour ×  I have devise 2.1.2 and cancan 1.6.8
installed.  The current_user helper from devise works fine in my
controllers, but is not working the view templates. I'm confused
why this is happening. I've been able to use current_user in my
view files before.  I tried adding the before_filter
authenticate_user! and that didn't help.  Worse comes to worse,
I'll add a before filter to the application_controller that says
@current_user = current_user but that seems silly.  It's weird
that current_user returns nil while user_signed_in? returns
true.  Any thoughts on how to get this resolved?  share|improve
this question add comment  1 Answer  up vote 2 down vote
accepted  In the meantime,warden.authenticate(:scope => :user)
seems to return the current_user so I'm just going to add that
to my application helper.  share|improve this answer I'm having
this exact problem, and am not finding a solution. Your
workaround above works, but I was wondering if you ever found a
solution to the problem. –  nic