In Onlamp there is a wonderful introduction to Ajax under Rails in
“Ajax on Rails,” (
I have taken the Author, Curt H.’ code from the example, and in
looking at other examples, a common seeming problem (to me) keeps
If I want to render to a < div > element, when I make a subsequent
render to it, it then shows both this rendering as well as the previous
– when in fact, I only want the latest rendering. The code for an
rhtml as well as a method coinciding with that rhtml bears this out.
How can I amend such code so as to only print the last link_to_remote
result? Also, would there be a way to render to, say, a textbox in this
Thank you. Ive looked at other Ajax on Rails examples and they all seem
to have this same ‘problem,’ which I’d like to get around.
What time is it?
The time is " + DateTime.now.to_s + “”