1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
class Exceptions < Application provides :html, :json # handle NotFound exceptions (404) def not_found display params end # handle NotAcceptable exceptions (406) def not_acceptable display params end # handle BadRequest exceptions (400) def bad_request display params end end