Bob Dijks


210 Experience
2 Lessons Completed
0 Questions Solved


Posted in Rails & Vue.js Trello Clone - Part 3 Discussion

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?

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.