Module: AocCli::Concerns::ErrorConcern

Included in:
ApplicationController
Defined in:
lib/aoc_cli/controllers/concerns/error_concern.rb

Instance Method Summary collapse

Instance Method Details

#render_error!(error) ⇒ Object



4
5
6
7
8
# File 'lib/aoc_cli/controllers/concerns/error_concern.rb', line 4

def render_error!(error)
  Components::ErrorsComponent.new(error).render

  false
end

#render_model_errors!(model) ⇒ Object



10
11
12
13
14
# File 'lib/aoc_cli/controllers/concerns/error_concern.rb', line 10

def render_model_errors!(model)
  Components::ErrorsComponent.from_model(model).render

  false
end