summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-26 19:34:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-26 19:34:33 +0000
commit1fcbeb6f816a70a3d14abd0f3519ef5d09bd7e66 (patch)
tree22a0c431952eb8283fe52af6ffd5b6198170f873 /app
parent454117a025122fbc103796077a843103df3fa41a (diff)
downloadredmine-1fcbeb6f816a70a3d14abd0f3519ef5d09bd7e66.tar.gz
redmine-1fcbeb6f816a70a3d14abd0f3519ef5d09bd7e66.zip
Use named routes or helpers.
git-svn-id: http://svn.redmine.org/redmine/trunk@13656 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/attachments_helper.rb2
-rw-r--r--app/views/common/feed.atom.builder2
-rw-r--r--app/views/journals/index.builder8
-rw-r--r--app/views/mailer/reminder.html.erb2
4 files changed, 7 insertions, 7 deletions
diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb
index a785c1528..d86fe0dbe 100644
--- a/app/helpers/attachments_helper.rb
+++ b/app/helpers/attachments_helper.rb
@@ -39,7 +39,7 @@ module AttachmentsHelper
api.filesize attachment.filesize
api.content_type attachment.content_type
api.description attachment.description
- api.content_url url_for(:controller => 'attachments', :action => 'download', :id => attachment, :filename => attachment.filename, :only_path => false)
+ api.content_url download_named_attachment_url(attachment, attachment.filename)
api.author(:id => attachment.author.id, :name => attachment.author.name) if attachment.author
api.created_on attachment.created_on
end
diff --git a/app/views/common/feed.atom.builder b/app/views/common/feed.atom.builder
index e279859b1..74cebc582 100644
--- a/app/views/common/feed.atom.builder
+++ b/app/views/common/feed.atom.builder
@@ -3,7 +3,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.title truncate_single_line_raw(@title, 100)
xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
- xml.id url_for(:controller => 'welcome', :only_path => false)
+ xml.id home_url
xml.icon favicon_url
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
xml.author { xml.name "#{Setting.app_title}" }
diff --git a/app/views/journals/index.builder b/app/views/journals/index.builder
index 11b73f53c..5b907b828 100644
--- a/app/views/journals/index.builder
+++ b/app/views/journals/index.builder
@@ -2,8 +2,8 @@ xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.title @title
xml.link "rel" => "self", "href" => url_for(:format => 'atom', :key => User.current.rss_key, :only_path => false)
- xml.link "rel" => "alternate", "href" => home_url(:only_path => false)
- xml.id url_for(:controller => 'welcome', :only_path => false)
+ xml.link "rel" => "alternate", "href" => home_url
+ xml.id home_url
xml.icon favicon_url
xml.updated((@journals.first ? @journals.first.event_datetime : Time.now).xmlschema)
xml.author { xml.name "#{Setting.app_title}" }
@@ -11,8 +11,8 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
issue = change.issue
xml.entry do
xml.title "#{issue.project.name} - #{issue.tracker.name} ##{issue.id}: #{issue.subject}"
- xml.link "rel" => "alternate", "href" => url_for(:controller => 'issues' , :action => 'show', :id => issue, :only_path => false)
- xml.id url_for(:controller => 'issues' , :action => 'show', :id => issue, :journal_id => change, :only_path => false)
+ xml.link "rel" => "alternate", "href" => issue_url(issue)
+ xml.id issue_url(issue, :journal_id => change)
xml.updated change.created_on.xmlschema
xml.author do
xml.name change.user.name
diff --git a/app/views/mailer/reminder.html.erb b/app/views/mailer/reminder.html.erb
index f011da3e8..506fd697b 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><%= link_to_issue(issue, :project => true, :only_path => false) %></li>
<% end -%>
</ul>