Mercurial > rsstweet
diff app/views/tweets/show.atom.builder @ 48:8983c426e256
Prevent exploding on empty timeline.
author | nanaya <me@myconan.net> |
---|---|
date | Thu, 23 Apr 2015 16:14:35 +0900 |
parents | 207917e41964 |
children | 9ab79a764434 |
line wrap: on
line diff
--- a/app/views/tweets/show.atom.builder Thu Apr 23 16:05:08 2015 +0900 +++ b/app/views/tweets/show.atom.builder Thu Apr 23 16:14:35 2015 +0900 @@ -1,6 +1,6 @@ atom_feed do |feed| feed.title "#{@user.name} (@#{@user.screen_name})" - feed.updated @tweets.first.created_at + feed.updated @tweets.first.try(:created_at) || Time.at(0) @tweets.each do |tweet| feed.entry tweet, :url => tweet.uri, :updated => tweet.created_at do |entry|