Add extra fields to taxon serializer to be used in the api

This commit is contained in:
luisramos0
2019-08-14 21:52:16 +01:00
parent 45bdb85bf3
commit d08de4bdf9

View File

@@ -2,7 +2,7 @@ class Api::TaxonSerializer < ActiveModel::Serializer
cached
delegate :cache_key, to: :object
attributes :id, :name, :permalink, :icon
attributes :id, :name, :permalink, :icon, :pretty_name, :position, :parent_id, :taxonomy_id
def icon
object.icon(:original)