title: Is "proc" required with conditional before_action/before_filter?
body: <p>Behold, a <code>before_filter</code>:</p>
  
  <pre><code>class ThingController &lt; ApplicationController
    before_filter :check_stuff, :if =&gt; proc {Rails.env.production?}
  end
  </code></pre>
  
  <p>During a recent code review, I was asked, <strong>"Is the <code>proc</code> is required for this to work?"</strong> The answer appears to be 'yes', but it's a reasonable question, and I had intended to answer it by referring to the Rails docs or guides or something on the use of conditionals with <code>before_filter</code> (now an alias of <code>before_action</code>).</p>
  
  <p>I couldn't find any. The <a href="http://guides.rubyonrails.org/action_controller_overview.html" rel="noreferrer">Action Controller Guide</a> mentions <code>:only</code>/<code>:except</code>, but not <code>:if</code>/<code>:unless</code>.</p>
  
  <p>Failing that, is there somewhere in the code I can point to that covers this? It's mentioned briefly <a href="https://github.com/rails/rails/blob/master/actionpack/lib/abstract_controller/callbacks.rb#LC24" rel="noreferrer">here</a>, but that's more about how <code>:only</code> and <code>:except</code> are handled, rather than <code>:if</code> or <code>:unless</code>.</p>