# Basic RJS question with render update

**URL:** <https://www.ruby-forum.com/t/basic-rjs-question-with-render-update/131692>\
**Category:** Rails\
**Created:** [March 12, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/basic-rjs-question-with-render-update/131692 "2008-03-12T15:15:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [March 12, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/basic-rjs-question-with-render-update/131692/1 "2008-03-12T15:15:14Z")

</div>

Hi-

Just trying to confirm my understanding here. In Rails 2.02, all I  
have to do to fire off an RJS file is to simply name it the same as  
the action (plus .js.rjs) right?

So in my view, if I have:

\<%= link\_to\_remote “Alert”, :url =\>{:action =\> ‘do\_alert’} %\>

and if I just create a file called do\_alert.js.rjs like this:

render :update do |page|  
page.alert(‘hello’)  
end

should this work? It doesn’t. The log file says missing template,  
and is trying to render the html.erb file for the controller.

It’s not clear to me what render :update does, versus simply calling  
page.alert. Anyone have a good reference to point me in the right  
direction?

Thanks for any help,  
Dino

---

<div class="post-metadata">

**Author:** ![dino\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Post date:** [March 12, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/basic-rjs-question-with-render-update/131692/2 "2008-03-12T15:17:36Z")

</div>

Ok, please disregard myn posting, I figured out that render :update is  
for use in the controller itself, not in the rjs.  
Dino
