discourse/app/serializers/leader_requirements_serializer.rb

19 lines
553 B
Ruby
Raw Normal View History

class LeaderRequirementsSerializer < ApplicationSerializer
attributes :time_period,
2014-06-26 12:48:07 -05:00
:requirements_met,
:days_visited, :min_days_visited,
:num_topics_replied_to, :min_topics_replied_to,
2014-06-26 12:48:07 -05:00
:topics_viewed, :min_topics_viewed,
:posts_read, :min_posts_read,
:num_flagged_posts, :max_flagged_posts,
:num_flagged_by_users, :max_flagged_by_users
def time_period
LeaderRequirements::TIME_PERIOD
end
2014-06-26 12:48:07 -05:00
def requirements_met
object.requirements_met?
end
end