title: How to stop a rails controller from executing?
body: <p>I have the following piece of code</p>
  
  <pre><code>def show
      unless logged_in?
        login_required
        return
      end
      #some additional code
      #that should only execute
      #if user is logged in
  end
  </code></pre>
  
  <p>This works perfectly.
  Now I'd like to move the login check into a before filter.
  The problem is, that when I return from a method outside of show, it doesn't stop the execution of show... how do i stop <code>show</code> from going through with the code from an external method (i.e. one that could be called from a before filter)?</p>
  
  <p>Thanks!</p>