I’m trying to create the following:
There is a index page that lists some items, and ‘new item’ button. I
want the user to be able to click the button, and with ajax the page
will be refreshed to show the new item form.
For that, I added a format.js on my controller, and created a
new.js.erb file for the action.
My problem is, how can I, inside the new.js template, print the
Something like this:
It doesn’t work. Do I really have to create a partial for the entire
form to accomplish this?