[issue #428] Fixed refs in advisory preview
This commit is contained in:
parent
e00e88340b
commit
7515f3515d
|
@ -30,7 +30,7 @@ class AdvisoriesController < ApplicationController
|
|||
@advisory = Advisory.by_update_type(params[:bl_type]).search_by_id(params[:query]).limit(1).first
|
||||
raise ActionController::RoutingError.new('Not Found') if @advisory.nil?
|
||||
respond_to do |format|
|
||||
format.json { render :json => @advisory }
|
||||
format.json { render @advisory }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
json.id advisory.id
|
||||
json.advisory_id advisory.advisory_id
|
||||
json.description advisory.description
|
||||
json.references advisory.references.split("\n").map { |ref| construct_ref_link(ref) }.join('<br />')
|
||||
json.update_type advisory.update_type
|
||||
|
Loading…
Reference in New Issue