Class: ErrorTracking::ErrorsFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/error_tracking/errors_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(current_user, project, params) ⇒ ErrorsFinder

Returns a new instance of ErrorsFinder.


5
6
7
8
9
# File 'app/finders/error_tracking/errors_finder.rb', line 5

def initialize(current_user, project, params)
  @current_user = current_user
  @project = project
  @params = params
end

Instance Method Details

#executeObject


11
12
13
14
15
16
17
18
19
# File 'app/finders/error_tracking/errors_finder.rb', line 11

def execute
  return ErrorTracking::Error.none unless authorized?

  collection = project.error_tracking_errors
  collection = by_status(collection)
  collection = sort(collection)

  collection.keyset_paginate(cursor: params[:cursor], per_page: limit)
end