Skip to content

Commit

Permalink
render a message saying which param and value to use when using fail_…
Browse files Browse the repository at this point in the history
…controller to deliberately trigger an error. Otherwise a missing template error is thrown
  • Loading branch information
stuzart committed Nov 11, 2024
1 parent aa7c265 commit 25b0f8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/fail_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ def index
x = nil
x.hello_world
when "406"
raise ActionController::UnknownController
raise ActionController::UnknownFormat
when "503"
raise RSolr::Error::ConnectionRefused
end

respond_to do |format|
format.html # index.html.erb
format.html { render plain: 'please use the http_code parameter, with a value of 404, 406, 500 or 503' }
end
end

Expand Down

0 comments on commit 25b0f8e

Please sign in to comment.