image delete

This commit is contained in:
2022-12-19 21:15:46 +02:00
parent a1ca7f6b29
commit f61ce40e71
3 changed files with 17 additions and 8 deletions

View File

@ -16,6 +16,12 @@ module Merged
}
end
def destroy
@image = Image.find(params[:id])
@image.destroy
redirect_to :images , nootice: "Image #{@image.name} deleted"
end
def show
@image = Image.find(params[:id])
@sections = Section.where(image_id: params[:id].to_i)