diff options
author | Etienne Massip <etienne.massip@gmail.com> | 2012-02-27 18:42:03 +0000 |
---|---|---|
committer | Etienne Massip <etienne.massip@gmail.com> | 2012-02-27 18:42:03 +0000 |
commit | 7056649a4be931a315fd4b4ad2be79ed8b9850e4 (patch) | |
tree | ec65c08fa6a4610982df49f58b3386c90321d1d4 /app | |
parent | 81554eae5af19154f75f6d0ccf33c3619b8ae50e (diff) | |
download | redmine-7056649a4be931a315fd4b4ad2be79ed8b9850e4.tar.gz redmine-7056649a4be931a315fd4b4ad2be79ed8b9850e4.zip |
Override @#url_for@ in AM to force generation of absolute links (#10251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9022 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/mailer.rb | 5 | ||||
-rw-r--r-- | app/views/mailer/_issue.html.erb | 2 | ||||
-rw-r--r-- | app/views/mailer/document_added.html.erb | 2 | ||||
-rw-r--r-- | app/views/mailer/issue_edit.html.erb | 2 | ||||
-rw-r--r-- | app/views/mailer/message_posted.html.erb | 2 | ||||
-rw-r--r-- | app/views/mailer/news_added.html.erb | 2 | ||||
-rw-r--r-- | app/views/mailer/news_comment_added.html.erb | 2 | ||||
-rw-r--r-- | app/views/mailer/reminder.html.erb | 2 |
8 files changed, 12 insertions, 7 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 2502ce2e0..5bb4f7e2c 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -30,6 +30,11 @@ class Mailer < ActionMailer::Base { :host => h, :protocol => Setting.protocol } end + def url_for(options) + options[:only_path] = false if options.is_a?(Hash) + super options + end + # Builds a tmail object used to email recipients of the added issue. # # Example: diff --git a/app/views/mailer/_issue.html.erb b/app/views/mailer/_issue.html.erb index 3d851d442..c649e44c9 100644 --- a/app/views/mailer/_issue.html.erb +++ b/app/views/mailer/_issue.html.erb @@ -12,4 +12,4 @@ <% end %> </ul> -<%= textilizable(issue, :description, :only_path => false) %> +<%= textilizable(issue, :description) %> diff --git a/app/views/mailer/document_added.html.erb b/app/views/mailer/document_added.html.erb index 8606dd784..be18e400d 100644 --- a/app/views/mailer/document_added.html.erb +++ b/app/views/mailer/document_added.html.erb @@ -1,3 +1,3 @@ <%= link_to(h(@document.title), @document_url) %> (<%=h @document.category.name %>)<br /> <br /> -<%= textilizable(@document, :description, :only_path => false) %> +<%= textilizable(@document, :description) %> diff --git a/app/views/mailer/issue_edit.html.erb b/app/views/mailer/issue_edit.html.erb index 07288e379..da406f999 100644 --- a/app/views/mailer/issue_edit.html.erb +++ b/app/views/mailer/issue_edit.html.erb @@ -6,6 +6,6 @@ <% end %> </ul> -<%= textilizable(@journal, :notes, :only_path => false) %> +<%= textilizable(@journal, :notes) %> <hr /> <%= render :partial => "issue.html.erb", :locals => { :issue => @issue, :issue_url => @issue_url } %> diff --git a/app/views/mailer/message_posted.html.erb b/app/views/mailer/message_posted.html.erb index f43a8cf0f..a8ccd2622 100644 --- a/app/views/mailer/message_posted.html.erb +++ b/app/views/mailer/message_posted.html.erb @@ -1,4 +1,4 @@ <h1><%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url) %></h1> <em><%=h @message.author %></em> -<%= textilizable(@message, :content, :only_path => false) %> +<%= textilizable(@message, :content) %> diff --git a/app/views/mailer/news_added.html.erb b/app/views/mailer/news_added.html.erb index 758ebccb8..9a024c09e 100644 --- a/app/views/mailer/news_added.html.erb +++ b/app/views/mailer/news_added.html.erb @@ -1,4 +1,4 @@ <h1><%= link_to(h(@news.title), @news_url) %></h1> <em><%=h @news.author.name %></em> -<%= textilizable(@news, :description, :only_path => false) %> +<%= textilizable(@news, :description) %> diff --git a/app/views/mailer/news_comment_added.html.erb b/app/views/mailer/news_comment_added.html.erb index ef2be0f65..b96de1489 100644 --- a/app/views/mailer/news_comment_added.html.erb +++ b/app/views/mailer/news_comment_added.html.erb @@ -2,4 +2,4 @@ <p><%= l(:text_user_wrote, :value => h(@comment.author)) %></p> -<%= textilizable @comment, :comments, :only_path => false %> +<%= textilizable @comment, :comments %> diff --git a/app/views/mailer/reminder.html.erb b/app/views/mailer/reminder.html.erb index f011da3e8..cfe8c977d 100644 --- a/app/views/mailer/reminder.html.erb +++ b/app/views/mailer/reminder.html.erb @@ -2,7 +2,7 @@ <ul> <% @issues.each do |issue| -%> - <li><%=h issue.project %> - <%=link_to(h("#{issue.tracker} ##{issue.id}"), :controller => 'issues', :action => 'show', :id => issue, :only_path => false)%>: <%=h issue.subject %></li> + <li><%=h issue.project %> - <%=link_to(h("#{issue.tracker} ##{issue.id}"), :controller => 'issues', :action => 'show', :id => issue)%>: <%=h issue.subject %></li> <% end -%> </ul> |