Class: ShowSerializer
- Inherits:
-
ActiveModel::Serializer
- Object
- ActiveModel::Serializer
- ShowSerializer
- Defined in:
- app/serializers/show_serializer.rb
Instance Method Summary collapse
Instance Method Details
#event ⇒ Object
8 9 10 |
# File 'app/serializers/show_serializer.rb', line 8 def event EventSerializer.new(object.event, @options) end |
#include_event? ⇒ Boolean
12 13 14 |
# File 'app/serializers/show_serializer.rb', line 12 def include_event? @options[:event] end |
#tickets_sold ⇒ Object
4 5 6 |
# File 'app/serializers/show_serializer.rb', line 4 def tickets_sold object.sold || 0 end |