[Vuejs]-Vue.js data inside erb link_to tag

0👍

I found a way around my problem using “v-bind”. I used a normal anchor tag instead of rails “link_to”.

Below is a snippet of index.html.erb

  <div class='panel-footer'>
    <a v-bind:href="'/maps/customer_detail?product=' + selectedProductId" class='btn btn-success'>Continue</a>
  </div>

Hope this helps anyone using Vue.js inside rails html.erb files

Leave a comment