Skip to main content

Using VueJS for Nested Forms in Rails: Part 1 Discussion

General • Asked by Chris Oliver
If I want to upload an image to the Team, how would it be? I'm trying to do it but I can not.

You think using both variable wordings underscore and camelcase is good? :)

Please break lines into the paragraph!

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


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.