dasibre wrote in post #1151967:
> If your tests are passing, try some debugging.
> Check your current_user helper method make sure its working the way its
> supposed to work.
>
> I would also check sessions to make sure the current user is available.

I am providing sessions_helper:

module SessionsHelper

.
.
.
.
.

  def current_user=(user)
    @current_user = user
  end

  def current_user
    remember_token = User.digest(cookies[:remember_token])
    @current_user ||= User.find_by(remember_token: remember_token)
  end

   def current_user?(user)
    user == current_user
  end

.
.
.
.
.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/dfd73281a1e1ccd27a497b6f0b4dbbd9%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to