Commit 9eb809e4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix ErrorTracking reference from controller

Otherwise during development when code reloading happens it looks for
ErrorTracking namespace inside contoller scope, causing a non found
class error.
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 53f6388a
......@@ -27,7 +27,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end
def update
service = ErrorTracking::IssueUpdateService.new(project, current_user, issue_update_params)
service = ::ErrorTracking::IssueUpdateService.new(project, current_user, issue_update_params)
result = service.execute
return if render_errors(result)
......@@ -40,7 +40,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
private
def render_index_json
service = ErrorTracking::ListIssuesService.new(
service = ::ErrorTracking::ListIssuesService.new(
project,
current_user,
list_issues_params
......@@ -57,7 +57,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end
def render_issue_detail_json
service = ErrorTracking::IssueDetailsService.new(project, current_user, issue_details_params)
service = ::ErrorTracking::IssueDetailsService.new(project, current_user, issue_details_params)
result = service.execute
return if render_errors(result)
......@@ -91,13 +91,13 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end
def serialize_errors(errors)
ErrorTracking::ErrorSerializer
::ErrorTracking::ErrorSerializer
.new(project: project, user: current_user)
.represent(errors)
end
def serialize_detailed_error(error)
ErrorTracking::DetailedErrorSerializer
::ErrorTracking::DetailedErrorSerializer
.new(project: project, user: current_user)
.represent(error)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment