fix indexing and ordering for section and card

This commit is contained in:
2022-12-11 14:03:21 +02:00
parent 829d653b44
commit 912400b852
13 changed files with 53 additions and 71 deletions

View File

@ -35,7 +35,7 @@ module Merged
def destroy
@card.destroy
@card.section.save
redirect_to section_cards_url(@card.section.id) , notice: "Card #{@card.index + 1} removed"
redirect_to section_cards_url(@card.section.id) , notice: "Card #{@card.index} removed"
end
def update

View File

@ -34,7 +34,7 @@ module Merged
def destroy
@section.destroy()
@section.page.save
redirect_to page_sections_url(@section.page.name) , notice: "Section #{@section.index + 1} removed"
redirect_to page_sections_url(@section.page.name) , notice: "Section #{@section.index} removed"
end
def set_image