Kevin Kim

Joined

3,210 Experience
32 Lessons Completed
0 Questions Solved

Activity

Hi Chris, great tutorial, first time commenter here!

I am curious why in removePlayer function, we needed this in this.team.players_attributes.splice(index, 1); but in addPlayer we did not need this while referring to

          team.players_attributes.push({
            id: null,
            name: "",
            // position: ""
            _destroy: null // keep in sync with other destroy methods
          })

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.