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 ...@@ -27,7 +27,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end end
def update 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 result = service.execute
return if render_errors(result) return if render_errors(result)
...@@ -40,7 +40,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle ...@@ -40,7 +40,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
private private
def render_index_json def render_index_json
service = ErrorTracking::ListIssuesService.new( service = ::ErrorTracking::ListIssuesService.new(
project, project,
current_user, current_user,
list_issues_params list_issues_params
...@@ -57,7 +57,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle ...@@ -57,7 +57,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end end
def render_issue_detail_json 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 result = service.execute
return if render_errors(result) return if render_errors(result)
...@@ -91,13 +91,13 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle ...@@ -91,13 +91,13 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end end
def serialize_errors(errors) def serialize_errors(errors)
ErrorTracking::ErrorSerializer ::ErrorTracking::ErrorSerializer
.new(project: project, user: current_user) .new(project: project, user: current_user)
.represent(errors) .represent(errors)
end end
def serialize_detailed_error(error) def serialize_detailed_error(error)
ErrorTracking::DetailedErrorSerializer ::ErrorTracking::DetailedErrorSerializer
.new(project: project, user: current_user) .new(project: project, user: current_user)
.represent(error) .represent(error)
end 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