| 1 |
atom_feed do |feed| |
| 2 |
feed.title("Gitorious activities") |
| 3 |
feed.updated((@events.blank? ? Time.now : @events.first.created_at)) |
| 4 |
|
| 5 |
@events.each do |event| |
| 6 |
action, body, category = action_and_body_for_event(event) |
| 7 |
feed.entry(event, :url => events_url) do |entry| |
| 8 |
entry.title("#{h(event.user.login)} #{strip_tags(action)}") |
| 9 |
entry.content(<<-EOS, :type => 'html') |
| 10 |
<p>#{link_to event.user.login, user_path(event.user)} #{action}</p> |
| 11 |
<p>#{body}<p> |
| 12 |
EOS |
| 13 |
entry.author do |author| |
| 14 |
author.name(event.user.login) |
| 15 |
end |
| 16 |
end |
| 17 |
end |
| 18 |
end |