changeset 16: | 01fd3f10ae84 |
author: | moriq@moriq.com |
date: | Mon Mar 10 10:13:18 2008 +0900 (16 years ago) |
permissions: | -rw-r--r-- |
description: | add plugins rspec_on_rails |
1module ActionController2 module Rescue3 def use_rails_error_handling!4 @use_rails_error_handling = true5 end67 def use_rails_error_handling?8 @use_rails_error_handling ||= false9 end1011 protected12 def rescue_action_with_fast_errors(exception)13 if use_rails_error_handling?14 rescue_action_without_fast_errors exception15 else16 raise exception17 end18 end19 alias_method_chain :rescue_action, :fast_errors20 end21end