Fixed redirection back after approving an image

This commit is contained in:
Christoph Haas 2018-05-28 17:29:56 +02:00
parent 83765bec1b
commit 43f1419354

View file

@ -147,7 +147,7 @@ class PackagesController < ApplicationController
@screenshot = Screenshot.find(params[:id])
@screenshot.approve_screenshot!
flash['notice'] = "Screenshot approved."
redirect_back(fallback_location: package_path)
redirect_back(fallback_location: package_path(name: @screenshot.package.name))
end
# Returns a 160x120 thumbnail image if posssible.