title: before_action for specific controller
body: <pre><code>class ApplicationController &lt; ActionController::Base
        before_action :test, only: [:index]
  
        def test
            ap 'test'
        end
      end
  </code></pre>
  
  <p>The above is run before every single index action, be it dogs#index or cats#index or rabbits#index. How should I get it to execute just before cats#index and rabbits#index?</p>
  
  <p>I want to test to be exectuted before actions in many controllers.</p>