Moved approve_screenshot to packages controller

This commit is contained in:
Christoph Haas 2016-06-13 17:55:59 +02:00
parent e46f2a3dff
commit 0d3dfdff94

View file

@ -64,6 +64,13 @@ class PackagesController < ApplicationController
end
end
def approve_screenshot
@screenshot = Screenshot.find(params[:id])
@screenshot.approve_screenshot!
flash['notice'] = "Screenshot approved."
redirect_to :back
end
# Returns a 160x120 thumbnail image if posssible.
# If the package is not found it returns a dummy image along with status 404.
# If the package is found but has no screenshots then it also returns a