mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:44:40 +08:00
FEATURE: Decouple category/tag presence in sidebar from notifi level (#17273)
This commit is contained in:

committed by
GitHub

parent
db53c6650b
commit
3266350e80
@ -107,6 +107,10 @@ class User < ActiveRecord::Base
|
||||
|
||||
belongs_to :uploaded_avatar, class_name: 'Upload'
|
||||
|
||||
has_many :sidebar_section_links, dependent: :delete_all
|
||||
has_many :category_sidebar_section_links, -> { where(linkable_type: "Category") }, class_name: 'SidebarSectionLink'
|
||||
has_many :sidebar_tags, through: :sidebar_section_links, source: :linkable, source_type: "Tag"
|
||||
|
||||
delegate :last_sent_email_address, to: :email_logs
|
||||
|
||||
validates_presence_of :username
|
||||
|
Reference in New Issue
Block a user