From 9ca32a6d1a1a8bfb28c929ca13ff061baff4dca2 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 25 Jun 2019 18:10:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87url=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b4e3baf51..32c4438a6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -128,7 +128,7 @@ module ApplicationHelper if source.class.to_s == 'User' File.join(relative_path, ["#{source.class}", "#{source.id}"]) else - File.join("/images/avatars", ["#{source.class}", "#{source.id}"]) + File.join("images/avatars", ["#{source.class}", "#{source.id}"]) end elsif source.class.to_s == 'User' str = source.user_extension.try(:gender).to_i == 0 ? "b" : "g" @@ -146,7 +146,7 @@ module ApplicationHelper def shixun_url_to_avatar(shixun) if File.exist?(disk_filename(shixun.class, shixun.id)) - File.join("/images/#{relative_path}", "#{shixun.class}", "#{shixun.id}") + File.join("images/#{relative_path}", "#{shixun.class}", "#{shixun.id}") else File.join("educoder", "index", "shixun", "shixun#{rand(23)}.jpg") end