mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
PERF: move 3 more option columns out of the user table
This commit is contained in:
parent
f9c5cded6f
commit
f0e942f647
22 changed files with 278 additions and 250 deletions
|
@ -82,8 +82,6 @@ class UserSerializer < BasicUserSerializer
|
|||
:can_delete_all_posts
|
||||
|
||||
private_attributes :locale,
|
||||
:auto_track_topics_after_msecs,
|
||||
:new_topic_duration_minutes,
|
||||
:muted_category_ids,
|
||||
:tracked_category_ids,
|
||||
:watched_category_ids,
|
||||
|
@ -253,14 +251,6 @@ class UserSerializer < BasicUserSerializer
|
|||
### PRIVATE ATTRIBUTES
|
||||
###
|
||||
|
||||
def auto_track_topics_after_msecs
|
||||
object.auto_track_topics_after_msecs || SiteSetting.default_other_auto_track_topics_after_msecs
|
||||
end
|
||||
|
||||
def new_topic_duration_minutes
|
||||
object.new_topic_duration_minutes || SiteSetting.default_other_new_topic_duration_minutes
|
||||
end
|
||||
|
||||
def muted_category_ids
|
||||
CategoryUser.lookup(object, :muted).pluck(:category_id)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue