mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
Redirect back rather than to the index
This fixes the issue where it returns to page 1 if you destroy a photo on a subsequent page.
This commit is contained in:
parent
64166b4a51
commit
0866d71eff
@ -37,7 +37,7 @@ class Admin::PhotosController < Admin::AdminController
|
||||
@photo = Photo.find(params[:id])
|
||||
@photo.destroy
|
||||
|
||||
redirect_to admin_photos_path, notice: 'Photo was deleted.'
|
||||
redirect_to :back, notice: 'Photo was deleted.'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Loading…
Reference in New Issue
Block a user