组织首页改版,增加精选、新闻

This commit is contained in:
xxq250 2023-04-10 15:32:47 +08:00
parent 5eff025f62
commit 3f20436bd8
1 changed files with 2 additions and 1 deletions

View File

@ -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? }