[phase-3]error page with not exist id

This commit is contained in:
Toru Takahashi 2018-05-04 10:08:14 +09:00 committed by TAKAHASHI,Toru
parent cffd7877da
commit 7a084fdb67

View File

@ -13,5 +13,7 @@ class GlossaryTermsController < ApplicationController
# Find the term whose id is the :id parameter
def find_term_from_id
@term = GlossaryTerm.find(params[:id])
rescue ActiveRecord::RecordNotFound
render_404
end
end