Xavier Noria
2006-Mar-04 19:58 UTC
[Rails] lesson learned: careful with :update in link_to_remote
A link_to_remote call was generating Ajax.Request instead of Ajax.Updater. I couldn''t for the life of me understand why. There was some extra indirection because I used there a helper of mine that receives an image and generates a link_to_remote with image_tag and some stuff for image rollover. After browsing the sources in the API website (hey, that "[ show source ]" feature is really wonderful) I saw that remote_function(), used by link_to_remote(), chooses one or the other depending on whether :update is present. Oh, light! Exactly, I came back to the template and had actually written ":udpate". -- fxn