Sha256: e7a873167780d84648abd4ec625d4c946444adcd5bff2be14e5caf9352f31583

Contents?: true

Size: 1.36 KB

Versions: 22

Compression:

Stored size: 1.36 KB

Contents

if @document.nil?
	@recommendations = Array.new
else 
	@recommendations = @document.ranked_recommendations(@limit, params[:order] || "mixed")
end

headers["Content-Type"] = "application/rss+xml"
xml.instruct!
	
xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/", "xmlns:oerr" => "http://www.oerrecommender.org/oerr/elements/1.0/" do
    xml.channel do

    xml.title       "OER Recommender recommendations for " + @document.permalink
    xml.link        url_for(request.env["REQUEST_URI"])
#    xml.pubDate     CGI.rfc1123_date @entries.first.updated_at if @entries.any?
#    xml.description "Blog posts for " + @event.title
	xml.generator 'OER Recommender'

    @recommendations.each do |recommendation|
      xml.item do
        xml.link recommendation["uri"]
        xml.oerr :clicks, recommendation["clicks"]
        xml.oerr :relevance, round(recommendation["relevance"])
        xml.title recommendation["title"]
        if recommendation["description"] != nil
	        xml.description "type" => "html" do
	        	xml.text! recommendation["description"]
	        end
	    end
#        xml.pubDate     CGI.rfc1123_date recommendation.created_at
        xml.guid        "http://www.oerrecommender.org/r?id=" + recommendation["id"].to_s
#        xml.author      "#{entry.author} (#{entry.author})"
      end
    end

  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
muck-raker-0.1.1 app/views/recommendations/index.rss.builder
muck-raker-0.1.2 app/views/recommendations/index.rss.builder
muck-raker-0.1.3 app/views/recommendations/index.rss.builder
muck-raker-0.1.4 app/views/recommendations/index.rss.builder
muck-raker-0.1.5 app/views/recommendations/index.rss.builder
muck-raker-0.1.6 app/views/recommendations/index.rss.builder
muck-raker-0.1.7 app/views/recommendations/index.rss.builder
muck-raker-0.1.8 app/views/recommendations/index.rss.builder
muck-raker-0.1.9 app/views/recommendations/index.rss.builder
muck-raker-0.1.10 app/views/recommendations/index.rss.builder
muck-raker-0.1.11 app/views/recommendations/index.rss.builder
muck-raker-0.1.12 app/views/recommendations/index.rss.builder
muck-raker-0.1.13 app/views/recommendations/index.rss.builder
muck-raker-0.1.14 app/views/recommendations/index.rss.builder
muck-raker-0.1.15 app/views/recommendations/index.rss.builder
muck-raker-0.1.16 app/views/recommendations/index.rss.builder
muck-raker-0.1.17 app/views/recommendations/index.rss.builder
muck-raker-0.1.18 app/views/recommendations/index.rss.builder
muck-raker-0.1.19 app/views/recommendations/index.rss.builder
muck-raker-0.1.20 app/views/recommendations/index.rss.builder