# Partials redrawing

**URL:** <https://www.ruby-forum.com/t/partials-redrawing/174560>\
**Category:** Rails\
**Created:** [August 28, 2009, 4:37pm UTC](https://www.ruby-forum.com/t/partials-redrawing/174560 "2009-08-28T16:37:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RVince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@RVince](https://www.ruby-forum.com/u/RVince)\
**Post date:** [August 28, 2009, 4:37pm UTC](https://www.ruby-forum.com/t/partials-redrawing/174560/1 "2009-08-28T16:37:59Z")

</div>

I have a select in a partial (\_partialInPartial) , which itself is in  
a partial (\_partial).

\_partialInPartial contains a select. WIthin the select, I  
have :selected = \> nil so that there is nothing selected. When I  
redraw it, I therefore expect that nothing will be selected in it.

However, when I render :partial =\> ‘\_partialInPartial’ it is still  
retaining the previously selected value

Is this because it is a partial within a partial? If so, how can I get  
around this to make certaian a select in a partial is always set to,  
in effect, un-selected? Thanks, RVince

---

<div class="post-metadata">

**Author:** ![RVince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@RVince](https://www.ruby-forum.com/u/RVince)\
**Post date:** [August 28, 2009, 5:44pm UTC](https://www.ruby-forum.com/t/partials-redrawing/174560/2 "2009-08-28T17:44:44Z")

</div>

2009/8/28 RVince [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I have a select in a partial (\_partialInPartial) , which itself is in  
> a partial (\_partial).
> 
> \_partialInPartial contains a select. WIthin the select, I  
> have :selected = \> nil so that there is nothing selected. When I  
> redraw it, I therefore expect that nothing will be selected in it.
> 
> However, when I render :partial =\> ‘\_partialInPartial’ it is still  
> retaining the previously selected value

When you say ‘redraw’ do you mean go back to it in the browser or is  
it a fresh render from the server. If the former then it is the  
browser keeping the previous selection not your application. View the  
source in the browser to see if your selected =\> nil is getting  
through correctly.

Colin

---

<div class="post-metadata">

**Author:** ![RVince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@RVince](https://www.ruby-forum.com/u/RVince)\
**Post date:** [August 28, 2009, 9:48pm UTC](https://www.ruby-forum.com/t/partials-redrawing/174560/3 "2009-08-28T21:48:15Z")

</div>

Colin,

I think what I am asking is, should a redraw of a partial be the  
equivalent of a refresh of that partial only? (and if so, would that  
hold for a partial in a partial, or is that considered bad form in the  
rails world?) -RVince
