fix showing message when advisory not found

This commit is contained in:
Alexander Machehin 2013-06-17 17:29:25 +06:00
parent 58da53d066
commit 835e7b54cb
1 changed files with 1 additions and 1 deletions

View File

@ -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