2012-06-20 15:07:07 +01:00
|
|
|
atom_feed do |feed|
|
2014-11-05 21:11:02 +00:00
|
|
|
feed.title t('layout.advisories.atom_title')
|
2012-06-20 15:07:07 +01:00
|
|
|
feed.updated(@advisories.first.created_at) if @advisories.length > 0
|
|
|
|
|
|
|
|
@advisories.each do |advisory|
|
2014-01-21 04:51:49 +00:00
|
|
|
feed.entry(advisory, url: advisory_url(advisory)) do |entry|
|
|
|
|
content = raw(render(inline: true, partial: 'feed_partial', locals: { advisory: advisory }))
|
2012-06-20 15:07:07 +01:00
|
|
|
|
|
|
|
entry.title("#{t("activerecord.models.advisory")} #{advisory.advisory_id}")
|
2014-01-21 04:51:49 +00:00
|
|
|
entry.content(content, type: 'html')
|
2012-06-20 15:07:07 +01:00
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|