Commit 697bee6aa53fd2f07e27adeed923b8b3ac1e7cbd
1 parent
30b00acf
Exists in
master
and in
1 other branch
Setting IssueTracker url options on request.
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
app/controllers/errs_controller.rb
| @@ -28,6 +28,8 @@ class ErrsController < ApplicationController | @@ -28,6 +28,8 @@ class ErrsController < ApplicationController | ||
| 28 | end | 28 | end |
| 29 | 29 | ||
| 30 | def create_issue | 30 | def create_issue |
| 31 | + set_tracker_params | ||
| 32 | + | ||
| 31 | if @app.issue_tracker | 33 | if @app.issue_tracker |
| 32 | @app.issue_tracker.create_issue @err | 34 | @app.issue_tracker.create_issue @err |
| 33 | else | 35 | else |
| @@ -65,5 +67,11 @@ class ErrsController < ApplicationController | @@ -65,5 +67,11 @@ class ErrsController < ApplicationController | ||
| 65 | def find_err | 67 | def find_err |
| 66 | @err = @app.errs.find(params[:id]) | 68 | @err = @app.errs.find(params[:id]) |
| 67 | end | 69 | end |
| 70 | + | ||
| 71 | + def set_tracker_params | ||
| 72 | + IssueTracker.default_url_options[:host] = request.host | ||
| 73 | + IssueTracker.default_url_options[:port] = request.port | ||
| 74 | + IssueTracker.default_url_options[:protocol] = request.scheme | ||
| 75 | + end | ||
| 68 | 76 | ||
| 69 | end | 77 | end |