in the head i have
<script src="/assets/application.js?body=1" type="text/javascript"></script>
in the body I have
<a href="remove_fields(this)">xremove</a>
in the js I have
function remove_fields(link) {
...
}
clicking xremove link i get
No route matches [GET] "/recipes/1/remove_fields(this)"
whats wrong ?
EDIT – Updated the question for simplicity
Don’t use inline JavaScript. It’s all against the known best practises.
Use event handlers instead: