500 error on showing not existed commit fixed

王权利请求将github/fork/Andrew8xx8/patch-2合并到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.

合并请求报告