// Generated by Vuejs gem ~> github.com/ytbryan/vuejs // Run this example by adding <%= '<%=' %> javascript_pack_tag "<%= name %>" <%= '%' %><%= '>' %> into your // rails' view // To generate another of this component with turbolinks, please run `rails g vue something --turbolinks` import TurbolinksAdapter from 'vue-turbolinks'; import Vue from 'vue.esm' <% if options[:single] %> import App from '../parts/<%= name %>.vue' <% else %> import App from '../parts/<%= name %>/<%= name %>.vue' <% end %> Vue.use(TurbolinksAdapter) document.addEventListener('turbolinks:load', () => { if(isView("###")){ const app = new Vue({ render: h => h(App) }).$mount('#something') console.log({app}) } })