diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-06-13 12:34:15 +0200 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-06-13 12:34:15 +0200 |
commit | 87760a290eddbc35f4e89b129da6ec842a70f609 (patch) | |
tree | 7a77618425322e1c013b6b136e68657847134626 /app/services/issues | |
parent | 45e1941fb3acf8fdc0544842ce503de007e3c706 (diff) | |
download | gitlab-ce-87760a290eddbc35f4e89b129da6ec842a70f609.tar.gz |
Added an UrlBuilder for building rails named routes
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Diffstat (limited to 'app/services/issues')
-rw-r--r-- | app/services/issues/base_service.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/services/issues/base_service.rb b/app/services/issues/base_service.rb index 41fbe1ae08f..71b9ffc3489 100644 --- a/app/services/issues/base_service.rb +++ b/app/services/issues/base_service.rb @@ -1,6 +1,5 @@ module Issues class BaseService < ::BaseService - include Rails.application.routes.url_helpers private @@ -10,9 +9,7 @@ module Issues def execute_hooks(issue, action = 'open') issue_data = issue.to_hook_data - issue_url = project_issue_url(id: issue.iid, - project_id: issue.project, - host: Settings.gitlab['url']) + issue_url = Gitlab::UrlBuilder.new(:issue).build(issue.id) issue_data[:object_attributes].merge!(url: issue_url, action: action) issue.project.execute_hooks(issue_data, :issue_hooks) end |