I did something with ajax on my rails site (
http://boozrs.com) . The thing is I never could get the form_remote_tag to work properly with :update => 'someId', but something like this does work:
In view:
<%= image_tag('/images/indicator.gif', :border => 0, :id => 'posting', :style=> 'display: none;') %>
<% form_remote_tag(:url => {:action => 'comment', :user_id => session[:user_id]}, :before => "Element.show('posting')", :success => "Element.hide('posting')") do %>
<p><label>Comment</label><br/>
<textarea name="comment" rows="10" cols="50"></textarea></p>
<input type="submit" value="Add A Comment" />
<% end %> And the controller:
def comment
#do stuff here specific to what you want to do
render :update do |page|
page.replace_html 'comments', :partial => 'comments' #you can pass objects and other stuff here, if you want
end
end