In Rails 2, you could use link_to_remote ... :update => 'id' to automatically replace the content of $('#id'). Growing Rails Applications in Practice Check out our e-book. Learn to structure large Ruby on Rails codebases with the tools you already know and love. Introduce design conventions for controllers and user-facing models Create a system for growth Build applications to last Read more Show
![Rails 3: Make "link_to :remote => true" replace HTML elements with jQuery](https://cdn-ak-scissors.b.st-hatena.com/image/square/3525f24cfe9c1c4a88647da543baceee4d97db79/height=288;version=1;width=512/https%3A%2F%2Fmakandracards.com%2Fassets%2Fog_image-df8a035147a603b54fd4aed58db5981381d4fb8ed7422983e83e2ea94e511ed5.png)