From 3f20436bd835c04673fdbbec80273e1d487c3f88 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 10 Apr 2023 15:32:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=A6=96=E9=A1=B5=E6=94=B9?= =?UTF-8?q?=E7=89=88=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=B2=BE=E9=80=89=E3=80=81?= =?UTF-8?q?=E6=96=B0=E9=97=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/organization.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/organization.rb b/app/models/organization.rb index 2ec37ec27..aabe20130 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -81,7 +81,8 @@ class Organization < Owner validates :login, format: { with: NAME_REGEX, multiline: true, message: "只能含有数字、字母、下划线且不能以下划线开头和结尾" } delegate :description, :website, :location, :repo_admin_change_team_access, :recommend, - :visibility, :max_repo_creation, :num_projects, :num_users, :num_teams, :news_banner_id, :news_content, :memo, to: :organization_extension, allow_nil: true + :visibility, :max_repo_creation, :num_projects, :num_users, :num_teams, + :news_banner_id, :news_content, :memo, :news_title, :news_url, to: :organization_extension, allow_nil: true scope :with_visibility, ->(visibility) { joins(:organization_extension).where(organization_extensions: {visibility: visibility}) if visibility.present? }