rails 3.0 错误处理

rails 3.0异常处理in your application.rbActionController::Baserescue_from ActionController::RoutingE

rails 3.0 异常处理
in your application.rb

ActionController::Base  rescue_from ActionController::RoutingError, :with => :render_404  private  def render_404(exception = nil)    if exception        logger.info "Rendering 404: #{exception.message}"    end    render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false  end