as I want to show the current records the first time the page opens.
The problem is after submitting, I the 'old values' of the Div remain in
the Div, and now I have the new values with the old values. If I
continue to add some new values, I get always on top the new ones and
after the 'old ones', I get TWO tables, the new one and the old one.
How I can remove the old table ???
If for example I add some text on the top of the _list (partial included
in the Div), this text gets removed but NOT the table.
Any ideas ?
I'm updating the div with a .js.rjs file:
page.replace_html("div_listd", :partial => "list")
If in the page I don't put the <%= render :partial => "list" %>, I
don't see the inital records (correct), and subsequent forms submitted
show the resulted records ok, so the .js can replace the content of the
Div area ...
as I want to show the current records the first time the page opens.
The problem is after submitting, I the 'old values' of the Div remain in
the Div, and now I have the new values with the old values. If I
continue to add some new values, I get always on top the new ones and
after the 'old ones', I get TWO tables, the new one and the old one.
How I can remove the old table ???
If for example I add some text on the top of the _list (partial included
in the Div), this text gets removed but NOT the table.
Any ideas ?
I'm updating the div with a .js.rjs file:
page.replace_html("div_listd", :partial => "list")
If in the page I don't put the <%= render :partial => "list" %>, I
don't see the inital records (correct), and subsequent forms submitted
show the resulted records ok, so the .js can replace the content of the
Div area ...