Skip to content

500 error on showing not existed commit fixed

Matthias Käppler requested to merge github/fork/Andrew8xx8/patch-2 into master

Created by: Andrew8xx8

From Rails Guides

Rails will start the rendering process to dump the @book variable into 
the special_show view. But this will not stop the rest of the code in the 
show action from running, and when Rails hits the end of the action, it 
will start to render the show view – and throw an error.

In this case we need to place return dirrectly or use exceptions here.

Merge request reports

Loading