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?
|
||||
@screenshot.destroy
|
||||
redirect_to package_path
|
||||
flash['notice'] = "Screenshot deleted."
|
||||
redirect_to :back
|
||||
else
|
||||
head :forbidden
|
||||
end
|
||||
|
|
@ -99,7 +99,7 @@ class PackagesController < ApplicationController
|
|||
@screenshot.description = params[:description]
|
||||
@screenshot.save!
|
||||
flash['notice'] = "Description updated."
|
||||
redirect_to package_path
|
||||
redirect_to :back
|
||||
end
|
||||
|
||||
# Receive an anonymous report from a user to have a screenshot removed.
|
||||
|
|
@ -109,7 +109,7 @@ class PackagesController < ApplicationController
|
|||
@screenshot.markedfordelete = true
|
||||
@screenshot.save!
|
||||
flash['notice'] = "Screenshot reported. The moderators will deal with it."
|
||||
redirect_to package_path
|
||||
redirect_to :back
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue