500 error on showing not existed commit fixed
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.