ruby - redirect to index if status code 500 -



ruby - redirect to index if status code 500 -

i've added show action on controller:

redirect_to shows_path, status: 500

doesn't seem doing trick.

i want go show index whenever there's internal server error (500) show action.

although think bad thing usability standpoint, add together rescue clause triggered when exception thrown:

def show # whatever rescue redirect_to shows_path, error: 'something bad happened' end

ruby ruby-on-rails-3 ruby-on-rails-3.2

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -