# Please don't comment in this gist since I'm not notified by any comments here: # https://github.com/isaacs/github/issues/21 # This is the discussion to comment on: http://blog.arkency.com/2014/07/4-ways-to-early-return-from-a-rails-controller/ class ApplicationController < ActionController::Base # ... around_action :catch_halt def render(*args) super throw :halt end def redirect(*args) super throw :halt end def head(*args) super throw :halt end private def catch_halt catch :halt do yield end end end