SUSE/hackweek

View on GitHub
app/views/projects/index.rss.haml

Summary

Maintainability
Test Coverage
!!! XML
%rss(version="2.0"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:atom="http://www.w3.org/2005/Atom")
  %channel
    %link #{ newest_projects_url format: :rss }
    %atom:link(href="#{ newest_projects_url format: :rss }"
               rel="self"
               type="application/rss+xml")

    -if @episode.is_a? Episode
      %title Newest #{ @episode.name } projects
      %description These are the newest projects for #{ @episode.name }
    -else
      %title Newest projects (all Hackweeks)
      %description These are the newest projects for all Hackweeks

    -@newest.each do |project|
      %item
        %title #{ project.title }
        %link  #{ project_url(project) }
        %description #{ project.description }
        %author #{ project.originator.email } (#{ project.originator.name })
        %pubDate #{ project.created_at.rfc822 }
        %guid(isPermaLink='true') #{ project_url(project) }