Sha256: 88048bb495b4004dc4da194245a7baf17f103ed2e1245f872d496a816e53aec0

Contents?: true

Size: 577 Bytes

Versions: 12

Compression:

Stored size: 577 Bytes

Contents

module ActionController
  module Rescue
    def use_rails_error_handling!
      @use_rails_error_handling = true
    end

    def use_rails_error_handling?
      @use_rails_error_handling ||= false
    end

  protected
  
    def rescue_action_with_fast_errors(exception)
      unless respond_to?(:rescue_with_handler) and rescue_with_handler(exception)
        if use_rails_error_handling?
          rescue_action_without_fast_errors exception
        else
          raise exception
        end
      end
    end
    alias_method_chain :rescue_action, :fast_errors

  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
dchelimsky-rspec-rails-1.1.12 lib/spec/rails/extensions/action_controller/rescue.rb
dchelimsky-rspec-rails-1.1.99.1 lib/spec/rails/extensions/action_controller/rescue.rb
dchelimsky-rspec-rails-1.1.99.2 lib/spec/rails/extensions/action_controller/rescue.rb
dchelimsky-rspec-rails-1.1.99.3 lib/spec/rails/extensions/action_controller/rescue.rb
dchelimsky-rspec-rails-1.1.99.4 lib/spec/rails/extensions/action_controller/rescue.rb
dchelimsky-rspec-rails-1.1.99.5 lib/spec/rails/extensions/action_controller/rescue.rb
rspec-rails-1.1.12 lib/spec/rails/extensions/action_controller/rescue.rb
spree-0.6.0 vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/rescue.rb
spree-0.7.0 vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/rescue.rb
spree-0.7.1 vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/rescue.rb
spree-0.8.0 vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/rescue.rb
spree-0.8.1 vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_controller/rescue.rb