Class: ActiveError::FaultsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/active_error/faults_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



18
19
20
21
22
# File 'app/controllers/active_error/faults_controller.rb', line 18

def destroy
  @fault.destroy

  redirect_to faults_url, notice: "Exception was resolved"
end

#indexObject



7
8
9
# File 'app/controllers/active_error/faults_controller.rb', line 7

def index
  @faults = Fault.top_level.includes(:instances)
end

#showObject



11
12
13
14
15
16
# File 'app/controllers/active_error/faults_controller.rb', line 11

def show
  instance = @fault.instances.last ||
    @fault.instances.new(headers: {}, parameters: {})

  render html: Renderer.new(instance:).body
end