2016-09-29 10:53:20 +02:00
|
|
|
#encoding: UTF-8
|
|
|
|
|
|
|
|
xml.instruct! :xml, version: '1.0'
|
|
|
|
xml.rss version: '2.0' do
|
|
|
|
xml.channel do
|
2019-06-24 11:01:38 +02:00
|
|
|
xml.title "#{t('app.public.projects_list.projects_list.the_fablab_projects')} - #{@fab_name}"
|
2016-09-29 10:53:20 +02:00
|
|
|
xml.description t('app.public.home.latest_documented_projects')
|
|
|
|
xml.author @fab_name
|
|
|
|
xml.link root_url + '#!/projects'
|
|
|
|
xml.language I18n.locale.to_s
|
|
|
|
|
|
|
|
@projects.each do |project|
|
|
|
|
xml.item do
|
|
|
|
xml.guid project.id
|
|
|
|
xml.pubDate project.created_at.strftime('%F %T')
|
|
|
|
xml.title project.name
|
|
|
|
xml.link root_url + '#!/projects/' + project.slug
|
2019-06-24 11:01:38 +02:00
|
|
|
xml.author project.author&.user&.profile&.full_name
|
2016-09-29 10:53:20 +02:00
|
|
|
xml.description project.description
|
2017-05-17 12:18:20 +02:00
|
|
|
xml.enclosure url: root_url + project.project_image.attachment.large.url, length: project.project_image.attachment.large.size, type: project.project_image.attachment.content_type if project.project_image
|
2016-09-29 10:53:20 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|