title: Why is Rails before_filter called twice when the controller is subclassed?
body: <p>I'm at Rails 2.3.5 and I have this problem:</p>
  
  <pre><code>class BaseController &lt; ApplicationController
    before_filter :foo, :only =&gt; [:index]
  end
  
  class ChildController &lt; BaseController
    before_filter :foo, :only =&gt; [:index, :show, :other, :actions]
  end
  </code></pre>
  
  <p>The problem is that on ChildController, the :foo before filter gets called twice.</p>
  
  <p>I've tried a number of workarounds around this problem. If I don't include the <code>:index</code> action in the child, it never gets called for that action.</p>
  
  <p>The solution I found works, but I think it's very very ugly</p>
  
  <pre><code>skip_before_filter :foo
  before_filter :foo, :only =&gt; [:index, :show, :other, :actions]
  </code></pre>
  
  <p>Is there a better way to solve this problem?</p>