Added atom feed on the new cross-project issue list.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@686 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-08-31 20:22:36 +00:00
parent 6bdc13b33d
commit c68dac7e9a
3 changed files with 12 additions and 3 deletions

View File

@@ -135,8 +135,9 @@ class ApplicationController < ActionController::Base
return false
end
def render_feed(items, options={})
@items = items.sort {|x,y| y.event_datetime <=> x.event_datetime }
def render_feed(items, options={})
@items = items || []
@items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
@title = options[:title] || Setting.app_title
render :template => "common/feed.atom.rxml", :layout => false, :content_type => 'application/atom+xml'
end