Class: ReviewableScoreTypeSerializer
Instance Method Summary
collapse
expire_cache_fragment!, fragment_cache
#include!
Instance Method Details
#icon ⇒ Object
23
24
25
|
# File 'app/serializers/reviewable_score_type_serializer.rb', line 23
def icon
"flag"
end
|
#include_reviewable_priority? ⇒ Boolean
19
20
21
|
# File 'app/serializers/reviewable_score_type_serializer.rb', line 19
def include_reviewable_priority?
object.respond_to?(:reviewable_priority)
end
|
#reviewable_priority ⇒ Object
15
16
17
|
# File 'app/serializers/reviewable_score_type_serializer.rb', line 15
def reviewable_priority
object.reviewable_priority.to_i
end
|
#title ⇒ Object
Allow us to share post action type translations for backwards compatibility
11
12
13
|
# File 'app/serializers/reviewable_score_type_serializer.rb', line 11
def title
ReviewableScore.type_title(type)
end
|
#type ⇒ Object
6
7
8
|
# File 'app/serializers/reviewable_score_type_serializer.rb', line 6
def type
ReviewableScore.types[id]
end
|