moving cards up and down

This commit is contained in:
2022-12-01 19:25:22 +02:00
parent 33ea800735
commit a4af2d6872
5 changed files with 58 additions and 2 deletions

View File

@ -16,6 +16,16 @@ module Merged
redirect_to section_cards_url(@card.section.id)
end
def move
if( params[:dir] == "up")
@card.move_up
else
@card.move_down
end
@card.save
redirect_to section_cards_url(@card.section.id)
end
def update
@card.content.each do |key , value|
next if key == "id"