Commit f4998b5ac4886c8e8c415ec581687add9678e9f6
- Date: Mon Jan 21 09:10:45 +0000 2008
- Committer: Johan Sørensen (johan@johansorensen.com)
- Author: Johan Sørensen (johan@johansorensen.com)
- Commit SHA1: f4998b5ac4886c8e8c415ec581687add9678e9f6
- Tree SHA1: ca8f6f84d593d9cd023751aea51514d9745745ea
don't error on empty commit feeds
Commit diff
| |   |
| 1 | 1 | atom_feed do |feed| |
| 2 | 2 | feed.title("Gitorious: #{@project.title} - #{@repository.name}") |
| 3 | | feed.updated((@commits.first.date)) |
| 3 | feed.updated((@commits.blank? ? nil : @commits.first.date)) |
| 4 | 4 | |
| 5 | 5 | @commits.each do |commit| |
| 6 | 6 | item_url = "http://gitorious.org" + project_repository_commit_path(@project, @repository, commit.sha) |
| toggle raw diff |
--- a/app/views/browse/index.atom.builder
+++ b/app/views/browse/index.atom.builder
@@ -1,6 +1,6 @@
atom_feed do |feed|
feed.title("Gitorious: #{@project.title} - #{@repository.name}")
- feed.updated((@commits.first.date))
+ feed.updated((@commits.blank? ? nil : @commits.first.date))
@commits.each do |commit|
item_url = "http://gitorious.org" + project_repository_commit_path(@project, @repository, commit.sha) |