4 ms·
I hadn't seen todomvc but it doesn't quite address my issues. It still feels too disconnected from where I am. Also, I do write JS in separate JS files - but m
by marcamillion 11y ago
I hadn't seen todomvc but it doesn't quite address my issues. It still feels too disconnected from where I am.
Also, I do write JS in separate JS files - but my understanding is that when you want a response to be in JS, don't you have to use a corresponding `...js.erb` file to handle the action/response?
How else would you update the DOM after the action has been completed?
- boundlessdreamz 11y agoYou send the response as json and act upon it. Have a look at this - http://jsbin.com/depuvelixu/edit?html,js,output http://jsbin.com/depuvelixu/edit?html,js,output The json the code fetches is static but it can be served by a rails app. The DOM manipulation gets painful which is the reason people adopt JS frameworks.