Class: ArchetypeSerializer
Instance Method Summary
collapse
expire_cache_fragment!, fragment_cache
#include!
Instance Method Details
#name ⇒ Object
17
18
19
|
# File 'app/serializers/archetype_serializer.rb', line 17
def name
I18n.t("archetypes.#{object.id}.title")
end
|
#options ⇒ Object
6
7
8
9
10
11
12
13
14
15
|
# File 'app/serializers/archetype_serializer.rb', line 6
def options
object.options.keys.collect do |k|
{
key: k,
title: I18n.t("archetypes.#{object.id}.options.#{k}.title"),
description: I18n.t("archetypes.#{object.id}.options.#{k}.description"),
option_type: object.options[k],
}
end
end
|