Class: Eyeloupe::ExceptionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/eyeloupe/exceptions_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#root

Instance Method Details

#indexObject

GET /out_requests



9
10
11
12
13
# File 'app/controllers/eyeloupe/exceptions_controller.rb', line 9

def index
  @pagy, @exceptions = pagy(Exception.all.order(created_at: :desc), items: 50)

  render partial: 'frame' if params[:frame].present?
end

#showObject

GET /out_requests/1



16
17
18
19
20
# File 'app/controllers/eyeloupe/exceptions_controller.rb', line 16

def show
  start = @exception.line - 5
  start = 0 if start < 0
  @line_numbers = [*start..@exception.line+6]
end