Class: Alchemy::ElementSerializer

Inherits:
ActiveModel::Serializer
  • Object
show all
Defined in:
app/serializers/alchemy/element_serializer.rb

Instance Method Summary collapse

Instance Method Details

#display_nameObject


23
24
25
# File 'app/serializers/alchemy/element_serializer.rb', line 23

def display_name
  object.display_name_with_preview_text
end

#ingredientsObject


19
20
21
# File 'app/serializers/alchemy/element_serializer.rb', line 19

def ingredients
  object.contents.collect(&:serialize)
end