Is there a way to use the form_tag/remote_form_tag helpers in an RJS
template? I want to replace the innerHTML of a div with a remote form
as the result of an AJAX request and I’m not having any luck getting
it to work. I’m trying something like this:
page.replace_html “delete_div”, form_tag(:url=>"/listings") do
submit_tag “Delete” end
but that doesn’t work very well. The element is generated but
the block seems to be ignored. I’ve tried a million other variations
and can’t get them to work either. Any way to use these helpers in an
RJS template? If not, how else can I do what I’m trying to do?
Thanks in advance.