discourse/app/serializers/trust_level3_requirements_serializer.rb
riking c8111ada6e FEATURE: Allow admins to lock users from TL3 promotion/demotion
Also, update the display logic for the leader promotion screen to
account for the demotion grace period.
2014-09-30 13:15:13 +10:00

28 lines
941 B
Ruby

class TrustLevel3RequirementsSerializer < ApplicationSerializer
attributes :time_period,
:requirements_met,
:requirements_lost,
:trust_level_locked, :on_grace_period,
:days_visited, :min_days_visited,
:num_topics_replied_to, :min_topics_replied_to,
:topics_viewed, :min_topics_viewed,
:posts_read, :min_posts_read,
:topics_viewed_all_time, :min_topics_viewed_all_time,
:posts_read_all_time, :min_posts_read_all_time,
:num_flagged_posts, :max_flagged_posts,
:num_flagged_by_users, :max_flagged_by_users,
:num_likes_given, :min_likes_given,
:num_likes_received, :min_likes_received
def time_period
TrustLevel3Requirements::TIME_PERIOD
end
def requirements_met
object.requirements_met?
end
def requirements_lost
object.requirements_lost?
end
end