title: Helper Class not Accessible from View
body: <p>I defined a helper class as below </p>
  
  <pre><code>module SessionsHelper
  
    def current_user 
          @current_user= User.find_by_fbid(session[:fbid])
    end
  
  
    def sign_in(user)
          session[:fbid] = user.fbid
          @current_user = user
  
    end
  
  
    def signed_in?
         !current_user.nil?
    end
  
  
    end  
  </code></pre>
  
  <p>I included the Helper Class in my Application Controller</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    protect_from_forgery
    include SessionsHelper
  
  
  end
  </code></pre>
  
  <p>The sign in method gets called from Session Controller</p>
  
  <pre><code>class SessionsController &lt; ApplicationController
  
  
    def create
  
    user = User.find_or_create_by_fbid(params[:user][:fbid]) 
    user.update_attributes(params[:user])
    sign_in(user)
    redirect_to user_path(user)
  
    end
  
  end
  </code></pre>
  
  <p>However I am not able to access 'current_user' variable from users#show view.</p>
  
  <pre><code> &lt;% if signed_in? %&gt;
  &lt;p&gt;
    &lt;b&gt;Current User:&lt;/b&gt;
    &lt;%= current_user.name %&gt;
  &lt;/p&gt;
  
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>It says : undefined method `name' for nil:NilClass</p>
  
  <p>Can anyone please advise ?
  The method current_user does  not get called at all from index.</p>