FIX 更改云上实验室主站配置

This commit is contained in:
Jasder 2020-04-24 10:15:02 +08:00
parent cda614e9df
commit 260e6f8932
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ class Laboratory < ApplicationRecord
def site
rails_env = EduSetting.get('rails_env')
suffix = rails_env && rails_env != 'production' ? ".#{rails_env}.educoder.net" : '.educoder.net'
suffix = rails_env && rails_env != 'production' ? ".#{rails_env}.trustie.net" : '.trustie.net'
identifier ? "#{identifier}#{suffix}" : ''
end
@ -126,4 +126,4 @@ class Laboratory < ApplicationRecord
def main_site?
id == 1
end
end
end

View File

@ -1,6 +1,6 @@
<% school = laboratory&.school %>
<td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
<td class="text-left"><%= school&.name || 'EduCoder主站' %></td>
<td class="text-left"><%= school&.name || 'Trustie主站' %></td>
<td class="text-left">
<% if laboratory.identifier %>
<%= link_to laboratory.site, "https://#{laboratory.site}", target: '_blank' %>