diff options
Diffstat (limited to 'app/controllers/application.rb')
-rw-r--r-- | app/controllers/application.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/application.rb b/app/controllers/application.rb index b1e2b3d73..9a7096728 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -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 |