title: perform a render from an application controller method
body: <p>I need to do API version checks and so I've implemented a check in my controller method like:</p>
  
  <pre><code>if request.header["api_version"] != 1
    respond_to do |format|
      format.json {render :json =&gt; expiredMessage}
    end
    return
  end
  </code></pre>
  
  <p>Works fine, I'm returning in the control statement so Rails doesn't complain about double render. I tried to DRY these up into an application controller method as a before_filter, but then I get the multiple renders complaint from Rails. It seems that the scope has changed such that the 'return' in the control statement no longer returns from the original controller method? </p>
  
  <p>I'm wondering how I can do a render from the application controller method, or if there's a better way how can I implement this functionality? Thanks! </p>