discourse/app/serializers/user_option_serializer.rb
Sam 3829c78526 PERF: shift most user options out of the user table
As it stands we load up user records quite frequently on the topic pages,
this in turn pulls all the columns for the users being selected, just to
discard them after they are loaded

New structure keeps all options in a discrete table, this is better organised
and allows us to easily add more column without worrying about bloating the
user table
2016-02-17 18:08:25 +11:00

20 lines
570 B
Ruby

class UserOptionSerializer < ApplicationSerializer
attributes :user_id,
:email_always,
:mailing_list_mode,
:email_digests,
:email_private_messages,
:email_direct,
:external_links_in_new_tab,
:dynamic_favicon,
:enable_quoting,
:disable_jump_reply,
:digest_after_days,
:automatically_unpin_topics,
:edit_history_public
def include_edit_history_public?
!SiteSetting.edit_history_visible_to_public
end
end