Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Rails3 gem for displaying dynamic error pages.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
lib
test
.document
.gitignore
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
VERSION
public_rescue.gemspec

README.rdoc

PublicRescue

PublicRescue is a gem for rails application who want to display dynamic error pages. It creates a new Rack middleware which replaces ActionDispatch::ShowExceptions and overwrites the rescue_action_in_public method.

Requirements

  • Rails ~> 3.0.0

Installation

This library is intended to be installed as a gem $ gem install public_rescue

After you installed PublicRescue, you need to add it to your Gemfile and you're done ! It will use the default views included with PublicRescue.

Customization

PublicRescue comes with 2 generators.

$ rails g public_rescue:views This will install all views into app/view/public_rescue/public_errors. You can now customize your views.

If you need to have access to the controller, you can run :

$ rails g public_rescue NAME This will generate a controller that inherits from PublicRescue::PublicErrorsController and install the views into app/views/NAME. In the controller you have access to the env variable which contains additional information about the exception :

env = { :request,

	:exception,
	:status,
	:application_trace,
	:framework_trace,
	:full_trace

}

TODO

I should probably write some true tests…

Contributing to public_rescue

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright © 2011 Cyril Picard. See LICENSE.txt for further details.

Something went wrong with that request. Please try again.