title: ActionController::RoutingError (undefined method `before_filter' for Class): Error
body: <p>Basically I have a UsersInitializeController Class</p>
  
  <pre><code>class UsersInitializeController &lt; ApplicationController
    before_filter :authenticate_user!
  
    def create
      render true
    end
  end
  </code></pre>
  
  <p>authenticate_user! is found in the Application Controller</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    # protect_from_forgery
  
    def authenticate_user!
      @current_user = User.find_by_token params[:auth_token]
      if !@current_user
        @current_user = User.create :token =&gt; params[:auth_token]
      end
    end
  
  end
  </code></pre>
  
  <p>When my application starts,  it sends POST request to the UsersInitializeController. Since before_filter is set, it will thus call authenticate_user! first. However the error I got says before_filter is an undefined method.</p>
  
  <p>From my knowledge, before_filter exist in ActionController, and since UsersInitializeContoller &lt; ApplicationController &lt; ActionController, I shouldn't be getting this error. Has anyone encounter this issue before ?</p>
  
  <p><strong>Exception Stack (as requested)</strong></p>
  
  <pre><code>Started POST "/users_initialize.json" for 127.0.0.1 at 2012-03-06 00:32:50 -0800
  
  ActionController::RoutingError (undefined method `before_filter' for UsersInitializeController:Class):
  app/controllers/users_initialize_controller.rb:3:in `&lt;class:UsersInitializeController&gt;'
  app/controllers/users_initialize_controller.rb:1:in `&lt;top (required)&gt;'
  </code></pre>
  
  <p><strong>Routes.rb file (as requested)</strong></p>
  
  <pre><code>MyApplication::Application.routes.draw do
   resources :users_initialize
   match 'info/required_client_version' =&gt; 'info#required_client_version'
  end
  </code></pre>
  
  <hr>
  
  <p><strong>### Problem Solved ###</strong></p>
  
  <p>Unused Devise Gem somehow causing the complication. Removed it and done.</p>