# Observe\_form only works once

**URL:** <https://www.ruby-forum.com/t/observe-form-only-works-once/107490>\
**Category:** Rails\
**Created:** [June 22, 2007, 7:31am UTC](https://www.ruby-forum.com/t/observe-form-only-works-once/107490 "2007-06-22T07:31:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cjnkns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c5a1d2/32.png) [@cjnkns](https://www.ruby-forum.com/u/cjnkns)\
**Post date:** [June 22, 2007, 7:31am UTC](https://www.ruby-forum.com/t/observe-form-only-works-once/107490/1 "2007-06-22T07:31:25Z")

</div>

I’m using observe\_form for a simple ajax rating/voting system. When the  
user changes the form it works great. However, I replace the form with a  
:partial in my ajax data returned to reflect the new rating. For some  
reason after one successful operation it does not work again… changing  
the form has no effect.

If I view the page source it all looks as it should.

Does observe\_form stop working once you replace the observed form?

---

<div class="post-metadata">

**Author:** ![cjnkns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c5a1d2/32.png) [@cjnkns](https://www.ruby-forum.com/u/cjnkns)\
**Post date:** [June 22, 2007, 7:37am UTC](https://www.ruby-forum.com/t/observe-form-only-works-once/107490/2 "2007-06-22T07:37:58Z")

</div>

> Does observe\_form stop working once you replace the observed form?

Er, sorry for the reply to myself, but I found a bug in trac describing  
my exact problem. Apparently it is a prototype bug dealing with radio  
buttons. ☹

[http://dev.rubyonrails.org/ticket/7895](http://dev.rubyonrails.org/ticket/7895)

I need to search Rails Trac before posting here!
