mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 14:54:48 +08:00
59d04c0695
Changed internals so trust levels are referred to with TrustLevel[1], TrustLevel[2] etc. This gives us much better flexibility naming trust levels, these names are meant to be controlled by various communities.
23 lines
795 B
Ruby
23 lines
795 B
Ruby
class TrustLevel3RequirementsSerializer < ApplicationSerializer
|
|
attributes :time_period,
|
|
:requirements_met,
|
|
: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
|
|
end
|