1
0
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:
Daniel Barber 2015-08-20 15:42:06 +01:00
parent 64166b4a51
commit 0866d71eff

View File

@ -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