Showing reviews on package's details page from Ubuntu

This commit is contained in:
Christoph Haas 2016-08-16 12:50:03 +02:00
parent fc95fc9d9a
commit 339bb0427f
10 changed files with 89 additions and 1 deletions

View file

@ -191,6 +191,12 @@ class PackagesController < ApplicationController
redirect_to :back
end
# Show an HTML partial with reviews of this package from the Ubuntu API
def reviews
@reviews = Package.find_by_name!(params[:name]).ubuntu_reviews
render '_reviews', layout: false
end
private
# Send a dummy thumbnail reading "No screenshot available. Sorry."