Using VueJS for Nested Forms in Rails: Part 1 Discussion
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
})
Hi! But this work also with rails 6?
I have this error:
vue.runtime.esm.js:640 [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
(found in )
warn @ vue.runtime.esm.js:640
mountComponent @ vue.runtime.esm.js:4022
./node_modules/vue/dist/vue.runtime.esm.js.Vue.$mount @ vue.runtime.esm.js:8402
Vue._init @ vue.runtime.esm.js:5017
Vue @ vue.runtime.esm.js:5092
(anonymous) @ hello_vue.js:26
./node_modules/turbolinks/dist/turbolinks.js.e.dispatch @ turbolinks.js:75
r.notifyApplicationAfterPageLoad @ turbolinks.js:994
r.pageLoaded @ turbolinks.js:948
(anonymous) @ turbolinks.js:872