title: Rails - wrong number of arguments (1 for 0)
body: <p>I'm beginning with Rails for some days now. I'm trying to make a form application that requires the users to be logged in in every case.</p>
  
  <p>So I made the user login Railcast : <a href="http://railscasts.com/episodes/250-authentication-from-scratch" rel="nofollow">http://railscasts.com/episodes/250-authentication-from-scratch</a></p>
  
  <p>Now, I need to make the login required in my other controllers, so the user can't access the whole application without being logged in.
  I tryed this method :</p>
  
  <p><strong>application_controller.rb</strong></p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
  
    protect_from_forgery with: :exception
  
    helper_method :current_user
  
    private
  
    def current_user
      @current_user ||= User.find(session[:user_id]) if session[:user_id]
    end
  
    def logged_in
      return true if current_user 
    end 
  
    def login_required 
      if logged_in false
        redirect_to log_in_path and return false 
       end                                                                                                                    
    end 
  
  end 
  </code></pre>
  
  <p><strong>categories_controller.rb</strong></p>
  
  <pre><code>class CategoriesController &lt; ApplicationController
    before_filter :login_required
    def new
  
    def index
       @categories = Categorie.all
    end
  </code></pre>
  
  <p>It returns me this error :</p>
  
  <p>ArgumentError in CategoriesController#index
  wrong number of arguments (1 for 0)</p>
  
  <pre><code> Extracted source (around line #14):    
      def logged_in
          return true if current_user
      end 
  </code></pre>
  
  <p>Does my before_filter :login_required needs something else ?
  I don't really understand this error.</p>