Class: Core::Decorators::Campaign
- Inherits:
-
Draper::Decorator
- Object
- Draper::Decorator
- Core::Decorators::Campaign
- Defined in:
- lib/core/decorators/campaign.rb
Instance Method Summary collapse
Instance Method Details
#to_simple_h ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/core/decorators/campaign.rb', line 6 def to_simple_h { id: id.to_s, title: title, description: description, tags: , players: { current: invitations.where(status: :accepted).count, max: max_players } } end |