修复访问不存在的项目时报500的问题

This commit is contained in:
sw 2014-12-10 16:26:39 +08:00
parent 8eb583b971
commit 8a2d22265c
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ class ApplicationController < ActionController::Base
# Find project of id params[:id]
def find_project
@project = Project.find_by_id(params[:id])
@project = Project.find(params[:id])
rescue ActiveRecord::RecordNotFound
render_404
end