修复访问不存在的项目时报500的问题
This commit is contained in:
parent
8eb583b971
commit
8a2d22265c
|
@ -309,7 +309,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
# Find project of id params[:id]
|
# Find project of id params[:id]
|
||||||
def find_project
|
def find_project
|
||||||
@project = Project.find_by_id(params[:id])
|
@project = Project.find(params[:id])
|
||||||
rescue ActiveRecord::RecordNotFound
|
rescue ActiveRecord::RecordNotFound
|
||||||
render_404
|
render_404
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue