title: Rails landing page routing and devise
body: <p>My website should works just like facebook.com.
  If the user is logged and if it goes to "/" it should be rendered <strong>home</strong> controller. If it isn't logged it should be render <strong>landing_page</strong> controller</p>
  
  <blockquote>
    <p><strong>"/</strong>" &amp;&amp; <strong>user_signed_in?</strong>   --->  <strong>home</strong> controller</p>
    
    <p><strong>"/"</strong> &amp;&amp; <strong>user_not_logged</strong>   --->  <strong>landing_page</strong> controller</p>
  </blockquote>
  
  <p>I'm using Rails 4 and Devise</p>
  
  <p><strong>ApplicationController</strong></p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
  
    before_filter :authenticate_user!
  end
  </code></pre>
  
  <p><strong>Routes.rb</strong>  </p>
  
  <pre><code>get "landing_page/index"
  
  root 'home#index', :as =&gt; :home
  </code></pre>
  
  <p>How I could keep a "before_filter" in ApplicationControl that run in every controllers except "landing_page" controller?</p>
  
  <p><strong>Update</strong></p>
  
  <p>If I go to "/en/landing_page" it render landing_page controller correctly (logged out), but if I go to "/" it redirect me to "/users/sign_in"</p>
  
  <pre><code>class LandingPageController &lt; ApplicationController
    skip_before_action :authenticate_user!
  
    def index
    end
  
  end
  
  class ApplicationController &lt; ActionController::Base
  
    before_action :authenticate_user!
  
  end
  </code></pre>
  
  <p>Routes.rb</p>
  
  <pre><code> root 'landing_page#index'
  </code></pre>