title: How can I send a parameter to a before filter?
body: <p>I'd like to create a before_filter method in my application controller like this...</p>
  
  <pre><code>def check_role(role_name)
    unless logged_in_user.has_role? role_name
      flash[:notice] = 'Access to that area requires additional privileges.'
      redirect_to :back
    end
  end
  </code></pre>
  
  <p>However, it doesn't look as though before filters can take parameters.</p>
  
  <p>Is there a way to parameterize this call, or am I trying to drive a screw with a hammer?</p>