Rails & Vue.js Trello Clone - Part 3 Discussion
my hero ^
<draggable :list="lists" :options="{group: 'lists'}" class="row dragArea" @end="listMoved">
Thank you so much! I was wondering why drag & drop was not working properly. I mean when you drag & drop the list was moving back to its original place.
Also it says that,
options props has been deprecated in version v2.20.
So now we would use
<draggable :list="lists" group="lists" class="row dragArea" @end="listMoved">
I think.
If I don't want to drag and drop the columns, will I just remove the draggable directive from the columns? I still want to be able to drag cards from column to column ( and update the database) as well as modify the position of cards within the lists.
Thoughts?
Hello to all. I'm getting an Internal Server Error as a response when trying to PATCH a new list position. The error seems to be regarding the 'insert_at' method in def move in my lists controller. This is what I'm getting:
app/controllers/lists_controller.rb:60:in `move'
Started PATCH "/lists/1/move" for ::1 at 2021-08-12 18:57:16 -0500
Processing by ListsController#move as JSON
Parameters: {"list"=>{"position"=>"2"}, "id"=>"1"}
Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms | Allocations: 1158)
NoMethodError (undefined method `insert_at' for nil:NilClass):
Any thoughts?