# Rjs template: reload div

**URL:** <https://www.ruby-forum.com/t/rjs-template-reload-div/173251>\
**Category:** Rails\
**Created:** [August 5, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/rjs-template-reload-div/173251 "2009-08-05T17:56:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tilt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/67e7ee/32.png) [@tilt](https://www.ruby-forum.com/u/tilt)\
**Post date:** [August 5, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/rjs-template-reload-div/173251/1 "2009-08-05T17:56:18Z")

</div>

Hi,

I’d like to use AJAX to reload a single div containing content  
delivered by a partial. In my rjs template I thus wrote:

page[:my\_div].reload

Can I tell Rails where to look for the content that it shall  
regenerate? Rails automatically seems to look for the partial  
“\_my\_div.erb” located in the same directory as the rjs template, but  
in my case the partial isn’t in the same directory.

Is there sth like a :partial =\> “/my\_folder/\_partial” option I can  
pass to the reload method?

Btw is there a good documentation about rjs templates anywhere on the  
web?

Best regards & thanks many times for your help!

---

<div class="post-metadata">

**Author:** ![tilt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/67e7ee/32.png) [@tilt](https://www.ruby-forum.com/u/tilt)\
**Post date:** [August 6, 2009, 1:14pm UTC](https://www.ruby-forum.com/t/rjs-template-reload-div/173251/2 "2009-08-06T13:14:09Z")

</div>

Hi

page[:my\_div].reload is equivalent to

page[:my\_div].replace :partial =\> “my\_div”

So why can’t you use  
page[:my\_div].replace :partial =\> “/my\_folder/some\_partial”

Sijo
