No release in over 3 years
Low commit activity in last 3 years
Custom public error template
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

PublicExceptionExtension

Custom public error template

Usage

# config/initializers/public_exception.rb

Rails.application.config.public_exception_template = -> (request, status) do
  if request.original_fullpath.start_with?('/admin')
    "/admin/#{status}.html" # => render /public/admin/xxx.html
  end
end

Installation

Add this line to your application's Gemfile:

gem 'public_exception_extension'

And then execute:

$ bundle

Or install it yourself as:

$ gem install public_exception_extension

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.