about summary refs log tree commit diff
path: root/app/serializers
diff options
context:
space:
mode:
authorTakeshi Umeda <noel.yoshiba@gmail.com>2019-09-09 17:50:33 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-09-09 10:50:33 +0200
commit9c9dcf580ab9b40c3fd420159a0a02ea4dd11925 (patch)
tree73ca667e26a94ee31dcaba4a824e62d016906756 /app/serializers
parenta75009a65e1335047dff5488b4e67bdc03677590 (diff)
Add featured tags API (#11778)
* Add featured tags API

* Remove show and update, change scope, fix code style
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/rest/featured_tag_serializer.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/serializers/rest/featured_tag_serializer.rb b/app/serializers/rest/featured_tag_serializer.rb
new file mode 100644
index 000000000..08121ff16
--- /dev/null
+++ b/app/serializers/rest/featured_tag_serializer.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class REST::FeaturedTagSerializer < ActiveModel::Serializer
+  attributes :id, :name, :statuses_count, :last_status_at
+
+  def id
+    object.id.to_s
+  end
+end