2010-04-17 98 views

回答

4

找到一個solution。在ApplicationController中,添加:

rescue_from Exception, :with => :rescue_all_exceptions if RAILS_ENV == 'production' 

def rescue_all_exceptions(exception) 
    case exception 
    # do production-ey exception stuff 
    end 
end 

我很想聽聽其他選項...