lib/exceptionally/controller.rb in exceptionally-1.3.0 vs lib/exceptionally/controller.rb in exceptionally-1.4.0

- old
+ new

@@ -12,27 +12,19 @@ rescue_from ActiveRecord::RecordInvalid, :with => :record_invalid_handler if defined?(Apipie) rescue_from Apipie::ParamMissing, :with => :missing_param rescue_from Apipie::ParamInvalid, :with => :invalid_param end - if defined?(Pundit) - rescue_from Pundit::NotAuthorizedError, with: :not_authorized_error - end end # Raise custom error def exceptionally_handler(error) pass_to_error_handler(error) end # Raise 400 error def missing_param(error) pass_to_error_handler(error, 400) - end - - # Raise 401 error - def not_authorized_error(error) - pass_to_error_handler(error, 401) end # Raise 404 error def missing_record_handler(error) pass_to_error_handler(error, 404)