Class: ReviewableExplanationSerializer
- Inherits:
-
ApplicationSerializer
- Object
- ActiveModel::Serializer
- ApplicationSerializer
- ReviewableExplanationSerializer
- Defined in:
- app/serializers/reviewable_explanation_serializer.rb
Instance Method Summary collapse
- #hide_post_score ⇒ Object
- #id ⇒ Object
- #min_score_visibility ⇒ Object
- #scores ⇒ Object
- #spam_silence_score ⇒ Object
- #total_score ⇒ Object
Methods inherited from ApplicationSerializer
expire_cache_fragment!, fragment_cache
Methods inherited from ActiveModel::Serializer
Instance Method Details
#hide_post_score ⇒ Object
12 13 14 |
# File 'app/serializers/reviewable_explanation_serializer.rb', line 12 def hide_post_score Reviewable.score_required_to_hide_post end |
#id ⇒ Object
8 9 10 |
# File 'app/serializers/reviewable_explanation_serializer.rb', line 8 def id object[:reviewable].id end |
#min_score_visibility ⇒ Object
20 21 22 |
# File 'app/serializers/reviewable_explanation_serializer.rb', line 20 def min_score_visibility Reviewable.min_score_for_priority end |
#scores ⇒ Object
28 29 30 |
# File 'app/serializers/reviewable_explanation_serializer.rb', line 28 def scores object[:scores] end |
#spam_silence_score ⇒ Object
16 17 18 |
# File 'app/serializers/reviewable_explanation_serializer.rb', line 16 def spam_silence_score Reviewable.spam_score_to_silence_new_user end |
#total_score ⇒ Object
24 25 26 |
# File 'app/serializers/reviewable_explanation_serializer.rb', line 24 def total_score object[:reviewable].score end |