I want to create DELETE
links using the jquery-ujs
library.
I tried to integrate it into my application by following this how-to. So I installed the package first:
npm install --save jquery-ujs
The second step is require('jquery-ujs');
Where should I place it? I've tried to add this into my app.js
, but no effect.
Finally I've simply copied the rails.js
from the library folder /node_modules/jquery-ujs/src
to the /public/js
. Yeah, it's working! But it's just a workaround.
I'd like to integrate the lib cleanly. How to do this?
Btw. there is a package efficiently/jquery-laravel
, that should cover this requirement. But I want to find a solution without a further package.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire