title: Rails : know on which actions of a controller a filter/action is called
body: <p>I currently have the list of filters my controller can run using this code :</p>
  
  <pre><code>MyController._process_action_callbacks.select{
    |f| f.filter.is_a? Symbol
  }.map(&amp;:filter)
  </code></pre>
  
  <p>But I would also like to filter them on their action. I.e. something like this :</p>
  
  <pre><code>MyController._process_action_callbacks.select{
    |f| (f.filter.is_a?(Symbol)
    &amp;&amp; f.actions.include?(my_action)) # filter on action
  }.map(&amp;:filter)
  </code></pre>
  
  <p>which obviously doesn't work. How can I achieve this ?</p>
  
  <p>The only thing I have found is with <code>instance_variable_get('@if')</code>but this isn't really satisfying as it gives a string (I could <code>eval</code>it or parse it, but that doesn't seem idiomatic), and I also have to do it for the <code>unless</code>part.</p>