title: uninitialized constant DashboardController for localhost: when accesing site area accept admin side
body: <p>hello i have issue with "uninitialized constant DashboardController" when i open my site with localhost:3000. it shows me above error. its is not allowing me to enter user side. </p>
  
  <p>i have lots of models for admin as well users so i need solution for this error.</p>
  
  <p>y it so.... and i have define root :to => 'home/index' as my root file so whenever i write localhost in my browser it fails to load. </p>
  
  <p>i have installed devise for user and active-admin for admin.</p>
  
  <pre><code>// for devise user session
  controller :sessions do 
    get 'login' =&gt; :new
    post 'login' =&gt; :create
    delete 'logout' =&gt; :destroy
  end
  
  root :to =&gt; 'home#activity_list' //for localroot
  </code></pre>
  
  <hr>
  
  <hr>
  
  <blockquote>
    <p>New Question and its Answer :</p>
  </blockquote>
  
  <hr>
  
  <p>If you are getting this error then jus do this.</p>
  
  <blockquote>
    <p>Processing by Admin::DashboardController#index as HTML Completed 401
    Unauthorized in 1ms</p>
  </blockquote>
  
  <p>This arises when you try to open localhost:3000/admin and it redirects to localhost:3000/usres/sign_in</p>
  
  <p>then you can add those three lines, so copy these three lines and paste at the bottom of the file(after ActiveAdmin.setup do |config| .... end) in config/initializers/active_admin.rb.</p>
  
  <pre><code> ActiveAdmin::BaseController.class_eval do
     skip_before_filter :authenticate_user!
   end     
  </code></pre>
  
  <p>Actually i have   </p>
  
  <blockquote>
    <p>before_action :authenticate_user!</p>
  </blockquote>
  
  <p>in my application_controller. </p>
  
  <p>Just open ActiveAdmin::BaseController and put the skip_before_filter in there.</p>