Delete links are not working in phoenix 1.3

This is my first phoenix app so it’s possible i am doing something wrong here.

  • The issue - I cannot get delete links to work, When i hover over a delete link i see a ‘#’ at the end. When i click the link nothing happens , i see no errors in the javascript console. The delete link looks like this

<%= link “Delete”, to: supply_path(@conn, :delete, supply), method: :delete, class: “btn btn-danger btn-xs” %>

  • Some background - I am trying to add a html admin template to this phoenix app. I am not sure if the way i added the template specific js and css files to brunch is causing the issue…

  • What i tried - Looking in this forum i see folks had similar issues and were able to fix this issueI by removing removing node_modules and reinstalling npm modules. This did not work for me.

This is what my brunch config looks like - https://gist.github.com/skota/7a6404117679859bc2f19c9710cc9e3a

version info
phoenix :Phoenix v1.3.0
elixir: Elixir 1.5.1

can some one please help?

Thanks!

The link/2 call seems fine. Did you make sure your JavaScript is actually being loaded at the end of your <body> tag?

Yes, i have the app and vendor js at the end of body tag

And they’re both loading correctly?

Yes i can see them loading successfully in the browser network tab.

I noticed that you’re concatenating your vendor files to js/vendor (without the .js ending)
Also, are you sure phoenix_html.js exists in your node_modules folder? It usually resides in deps/phoenix_html/priv.

Oh wow. You are right…i am missing the extension for vendor…i will fix that and see what happens. Many thanks.