From 4af236dc3e8491c668e67cd382f48692d296ed3a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 27 Jun 2019 17:48:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=9E=E8=AE=AD=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=99=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/shixun.rb | 4 ++++ app/views/shixuns/_settings_edit.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/shixun.rb b/app/models/shixun.rb index e7682a74..fe9a00b1 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -273,6 +273,10 @@ class Shixun < ActiveRecord::Base return name end + def child_mirror_ids + self.mirror_repositories.where(:main_type => 0).pluck(:id) + end + def mirror_name self.mirror_repositories.map(&:type_name).blank? ? "" : self.mirror_repositories.map(&:type_name) end diff --git a/app/views/shixuns/_settings_edit.html.erb b/app/views/shixuns/_settings_edit.html.erb index e23adfc6..e4837252 100644 --- a/app/views/shixuns/_settings_edit.html.erb +++ b/app/views/shixuns/_settings_edit.html.erb @@ -71,7 +71,7 @@
<% @small_type.try(:each) do |type| %>

- + />

<% end %>