# :update to a list

**URL:** <https://www.ruby-forum.com/t/update-to-a-list/116982>\
**Category:** Rails\
**Created:** [October 11, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/update-to-a-list/116982 "2007-10-11T21:22:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [October 11, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/update-to-a-list/116982/1 "2007-10-11T21:22:55Z")

</div>

I have this list and what I want to do is to have a link that allows the  
user to add something to this list. So I have a form with the :update  
option, but I want the update to happen at the end of this div that I  
have set aside for this list. I don’t remember how to use :update and  
tell it to add at the end of the list. Or is it done with render? Can  
anyone help, Thanks,

-S

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [October 11, 2007, 9:36pm UTC](https://www.ruby-forum.com/t/update-to-a-list/116982/2 "2007-10-11T21:36:18Z")

</div>

On 10/11/07, Shandy N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have this list and what I want to do is to have a link that allows the  
> user to add something to this list. So I have a form with the :update  
> option, but I want the update to happen at the end of this div that I  
> have set aside for this list. I don’t remember how to use :update and  
> tell it to add at the end of the list. Or is it done with render? Can  
> anyone help, Thanks,

If you use :update in your link\_to\_remote or remote\_form\_for, you need  
to redraw the entire list. If you want to just add something to the  
bottom of the list, you leave off :update and do an RJS response  
(either a .rjs template or render :update do |page| … end)

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [October 12, 2007, 10:36am UTC](https://www.ruby-forum.com/t/update-to-a-list/116982/3 "2007-10-12T10:36:22Z")

</div>

On 11 Oct 2007, at 20:22, Shandy N. wrote:

> I have this list and what I want to do is to have a link that  
> allows the  
> user to add something to this list. So I have a form with the :update  
> option, but I want the update to happen at the end of this div that I  
> have set aside for this list. I don’t remember how to use :update and  
> tell it to add at the end of the list. Or is it done with render? Can  
> anyone help, Thanks,

\<% remote\_form\_for …, :update =\> ‘list’, :position =\> ‘bottom’ %\>

Fred

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [October 12, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/update-to-a-list/116982/4 "2007-10-12T15:37:03Z")

</div>

> \<% remote\_form\_for …, :update =\> ‘list’, :position =\> ‘bottom’ %\>
> 
> Fred

That’s it Fred, thank you, works just like I want.

-S
