Using redirect_to :back
This commit is contained in:
parent
0d3dfdff94
commit
5bffa5dfbb
1 changed files with 3 additions and 3 deletions
|
|
@ -57,8 +57,8 @@ class PackagesController < ApplicationController
|
||||||
|
|
||||||
if user_can_alter_screenshot?
|
if user_can_alter_screenshot?
|
||||||
@screenshot.destroy
|
@screenshot.destroy
|
||||||
redirect_to package_path
|
|
||||||
flash['notice'] = "Screenshot deleted."
|
flash['notice'] = "Screenshot deleted."
|
||||||
|
redirect_to :back
|
||||||
else
|
else
|
||||||
head :forbidden
|
head :forbidden
|
||||||
end
|
end
|
||||||
|
|
@ -99,7 +99,7 @@ class PackagesController < ApplicationController
|
||||||
@screenshot.description = params[:description]
|
@screenshot.description = params[:description]
|
||||||
@screenshot.save!
|
@screenshot.save!
|
||||||
flash['notice'] = "Description updated."
|
flash['notice'] = "Description updated."
|
||||||
redirect_to package_path
|
redirect_to :back
|
||||||
end
|
end
|
||||||
|
|
||||||
# Receive an anonymous report from a user to have a screenshot removed.
|
# Receive an anonymous report from a user to have a screenshot removed.
|
||||||
|
|
@ -109,7 +109,7 @@ class PackagesController < ApplicationController
|
||||||
@screenshot.markedfordelete = true
|
@screenshot.markedfordelete = true
|
||||||
@screenshot.save!
|
@screenshot.save!
|
||||||
flash['notice'] = "Screenshot reported. The moderators will deal with it."
|
flash['notice'] = "Screenshot reported. The moderators will deal with it."
|
||||||
redirect_to package_path
|
redirect_to :back
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue