vidibus-routing_error

This gem is part of the open source SOA framework Vidibus: www.vidibus.org

Catches ActionController::RoutingError which does not work with Rails 3 out of the box. It basically catches the exception on Rack-level and re-raises it on application-level.

Installation

Add the dependency to the Gemfile of your application:

gem "vidibus-routing_error"

Then call bundle install on your console.

Usage

With this gem installed, you are able to handle errors like in past versions of Rails:

class ApplicationController < ActionController::Base
  rescue_from ActionController::RoutingError, :with => :rescue_404

  def rescue_404
    # do something
    # IMPORTANT: If you modify this method, you have to restart the server.
  end
end

Keep in mind that you have to restart your server when changing the rescue-method!

Copyright © 2010 Andre Pankratz. See LICENSE for details.

Thank you!

The development of this gem was sponsored by Käuferportal: www.kaeuferportal.de