remove unused \ in the url

This commit is contained in:
BOHUNG 2019-12-28 18:54:28 +08:00
parent 77e92b7297
commit 4b8fed7e52
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class CancerpredictsController < ApplicationController
next if image_id.to_s == "" next if image_id.to_s == ""
@image = Headimages.find_by(:id=>image_id.to_s) @image = Headimages.find_by(:id=>image_id.to_s)
@url = @image.temp_file.to_s @url = @image.temp_file.to_s
@head_images[@image.sort_number.to_i] = ('<img class="head_logo" alt ="' + Pathname.new(@image.temp_file.file.file).basename.to_s+'" src="'+@url+'\"/>') @head_images[@image.sort_number.to_i] = ('<img class="head_logo" alt ="' + Pathname.new(@image.temp_file.file.file).basename.to_s+'" src="'+@url+'"/>')
end end
result['head_images'] = Hash[@head_images.sort].values.join('') result['head_images'] = Hash[@head_images.sort].values.join('')
@head_images = {} @head_images = {}
@ -26,7 +26,7 @@ class CancerpredictsController < ApplicationController
next if image_id.to_s == "" next if image_id.to_s == ""
@image = Headimages.find_by(:id=>image_id.to_s) @image = Headimages.find_by(:id=>image_id.to_s)
@url = @image.temp_file.to_s @url = @image.temp_file.to_s
@head_images[@image.sort_number.to_i] = ('<img class="head_logo" alt ="' + Pathname.new(@image.temp_file.file.file).basename.to_s+'" src="'+@url+'\"/>') @head_images[@image.sort_number.to_i] = ('<img class="head_logo" alt ="' + Pathname.new(@image.temp_file.file.file).basename.to_s+'" src="'+@url+'"/>')
end end
result['title'] = ((@form_to_show.title_texts == "") ? "" : '<a class="title_texts">'+@form_to_show.title_texts+'</a>')+Hash[@head_images.sort].values.join('') result['title'] = ((@form_to_show.title_texts == "") ? "" : '<a class="title_texts">'+@form_to_show.title_texts+'</a>')+Hash[@head_images.sort].values.join('')