Class: Jumbotron::Services::Canonical::UpsertGame
- Inherits:
-
CommandTower::Services::ApplicationService
- Object
- CommandTower::Services::ApplicationService
- Jumbotron::Services::Canonical::UpsertGame
- Defined in:
- app/services/jumbotron/services/canonical/upsert_game.rb
Overview
Persists the Game row only. Callers supply resolved season/phase/venue.
Constant Summary collapse
- MATERIAL_ATTRS =
%i[ season_id season_phase_id schedule_group_id scheduled_at lifecycle venue_id neutral_site progress_state progress_segment_kind progress_segment_number progress_clock_mode ].freeze
- SILENT_ATTRS =
%i[ progress_clock_seconds progress_clock_display ].freeze
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'app/services/jumbotron/services/canonical/upsert_game.rb', line 36 def call game = find_game context.game = resolve_game(game) rescue ActiveRecord::RecordInvalid => e context.fail!( application_error: Jumbotron::Errors::Canonical::MutationFailedError.new( details: { message: e. } ) ) end |