Class: UserOptionSerializer

Inherits:
ApplicationSerializer show all
Defined in:
app/serializers/user_option_serializer.rb

Instance Method Summary collapse

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#auto_track_topics_after_msecsObject



44
45
46
# File 'app/serializers/user_option_serializer.rb', line 44

def auto_track_topics_after_msecs
  object.auto_track_topics_after_msecs || SiteSetting.default_other_auto_track_topics_after_msecs
end

#new_topic_duration_minutesObject



53
54
55
# File 'app/serializers/user_option_serializer.rb', line 53

def new_topic_duration_minutes
  object.new_topic_duration_minutes || SiteSetting.default_other_new_topic_duration_minutes
end

#notification_level_when_replyingObject



48
49
50
51
# File 'app/serializers/user_option_serializer.rb', line 48

def notification_level_when_replying
  object.notification_level_when_replying ||
    SiteSetting.default_other_notification_level_when_replying
end

#theme_idsObject



57
58
59
# File 'app/serializers/user_option_serializer.rb', line 57

def theme_ids
  object.theme_ids.presence || [SiteSetting.default_theme_id]
end