From dcadadae0394cafaf7de67c33083c759a528ce44 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Wed, 16 Mar 2016 11:24:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E5=92=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=9A=84=E9=93=BE=E6=8E=A5=E4=BD=BF=E7=94=A8https://=20+Settin?= =?UTF-8?q?g.host=5Fname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b899a010c..d238235ed 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2943,11 +2943,19 @@ int main(int argc, char** argv){ end def user_url_in_org(user_id) - return Setting.host_name + "/users/" + user_id.to_s + if Rails.env.development? + return "http://localhost:3000/users/" + user_id.to_s + else + return "https://" + Setting.host_name + "/users/" + user_id.to_s + end end def logout_url_without_domain - return Setting.host_name + "/logout" + if Rails.env.development? + return "http://localhost:3000/logout" + else + return "https://" + Setting.host_name + "/logout" + end end def signin_url_without_domain