From 835e7b54cb9b12750f66647275a8ae3c52d18259 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Mon, 17 Jun 2013 17:29:25 +0600 Subject: [PATCH] fix showing message when advisory not found --- app/controllers/advisories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/advisories_controller.rb b/app/controllers/advisories_controller.rb index 912509508..b10afb889 100644 --- a/app/controllers/advisories_controller.rb +++ b/app/controllers/advisories_controller.rb @@ -21,7 +21,7 @@ class AdvisoriesController < ApplicationController def search @advisory = Advisory.by_update_type(params[:bl_type]).search_by_id(params[:query]).first - raise ActionController::RoutingError.new('Not Found') if @advisory.nil? + raise ActiveRecord::RecordNotFound.new('Not Found') if @advisory.nil? respond_to do |format| format.json { render @advisory } end