Commit bfdb975080556ddaa1ab020cbee23d37725f77b7
Committed by
Luciano Prestes
1 parent
5121b1f2
Exists in
master
and in
29 other branches
Fix subdir link when creating a new task.
Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/mailers/task_mailer.rb
... | ... | @@ -5,7 +5,7 @@ class TaskMailer < ActionMailer::Base |
5 | 5 | @target = task.target.name |
6 | 6 | @environment = task.environment.name |
7 | 7 | @url = generate_environment_url(task, :controller => 'home') |
8 | - url_for_tasks_list = task.target.kind_of?(Environment) ? '' : url_for(task.target.tasks_url) | |
8 | + url_for_tasks_list = task.target.kind_of?(Environment) ? '' : url_for(task.target.tasks_url.merge(:script_name => Noosfero.root('/'))) | |
9 | 9 | @tasks_url = url_for_tasks_list |
10 | 10 | |
11 | 11 | mail( |
... | ... | @@ -56,7 +56,7 @@ class TaskMailer < ActionMailer::Base |
56 | 56 | end |
57 | 57 | |
58 | 58 | def generate_environment_url(task, url = {}) |
59 | - url_for(Noosfero.url_options.merge(:host => task.environment.default_hostname).merge(url)) | |
59 | + url_for(Noosfero.url_options.merge(:host => task.environment.default_hostname).merge(url).merge(:script_name => Noosfero.root('/'))) | |
60 | 60 | end |
61 | 61 | |
62 | 62 | end | ... | ... |