# Where are the doc. for "render :update do |page|"?

**URL:** <https://www.ruby-forum.com/t/where-are-the-doc-for-render-update-do-page/82160>\
**Category:** Rails\
**Created:** [January 17, 2007, 8:59pm UTC](https://www.ruby-forum.com/t/where-are-the-doc-for-render-update-do-page/82160 "2007-01-17T20:59:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sayoyo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Post date:** [January 17, 2007, 8:59pm UTC](https://www.ruby-forum.com/t/where-are-the-doc-for-render-update-do-page/82160/1 "2007-01-17T20:59:01Z")

</div>

Hi,

I found out there is a new parameter for the “render” function, but I  
couldn’t find any information or documentation on it, specically on what  
we can do with |page|, there are examples on the new book “agile Web  
Development with rails”, but it doesn’t contains any information about  
it, like: on p.559

…  
render :update do |page|  
page.replace\_html ‘pending\_todos’, :partial =\> ‘pending\_todos’  
page.replace\_html ‘completed\_todos’, :partial =\> ‘completed\_todos’  
page.sortable “pending\_todo\_list”, :url  
=\>{:action=\>:sort\_pending\_todos, :id =\>@user}  
end  
…

why |page| can call “replace\_html” and “sortable”, is |page| a  
ruby-rails objet? or javascript obj? or user defined obj???

does some one know where can I find the documentation???

Thanks you very much

Sayoyo

---

<div class="post-metadata">

**Author:** ![sayoyo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Post date:** [January 17, 2007, 10:29pm UTC](https://www.ruby-forum.com/t/where-are-the-doc-for-render-update-do-page/82160/2 "2007-01-17T22:29:42Z")

</div>

sayoyo wrote:

> render :update do |page|

Google RJS, standing for Remote JavaScript. Also get ARTS with  
assert\_rjs

And note that ‘page’ is a poor choice for a variable name - especially  
a published one - because the web already has too many pages…

–  
Phlip  
[http://c2.com/cgi/wiki?ZeekLand](http://c2.com/cgi/wiki?ZeekLand) ← NOT a blog!!

---

<div class="post-metadata">

**Author:** ![sayoyo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Post date:** [January 17, 2007, 10:29pm UTC](https://www.ruby-forum.com/t/where-are-the-doc-for-render-update-do-page/82160/3 "2007-01-17T22:29:43Z")

</div>

sayoyo wrote:

> Hi,
> 
> I found out there is a new parameter for the “render” function, but I  
> couldn’t find any information or documentation on it, specically on what  
> we can do with |page|, there are examples on the new book “agile Web  
> Development with rails”, but it doesn’t contains any information about  
> it, like: on p.559
> 
> …  
> render :update do |page|

This was confusing for me too at first. It’s an instance of the  
JavaScriptGenerator class:  
[http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html](http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html)

And if you’re going to use the page.visual\_effect method, more info  
about that is here:  
[http://api.rubyonrails.com/classes/ActionView/Helpers/ScriptaculousHelper.html](http://api.rubyonrails.com/classes/ActionView/Helpers/ScriptaculousHelper.html)

I think |page| is often used instead of |generator| to help you think  
about what you’re doing to the web page, and worry less that you just  
happen to be doing that indirectly by generating javascript.

Jeff

> **[Hey Daddio!](http://softiesonrails.com)**
>
> Home of Hey Daddio Software

---

<div class="post-metadata">

**Author:** ![sayoyo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Post date:** [January 22, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/where-are-the-doc-for-render-update-do-page/82160/4 "2007-01-22T23:59:09Z")

</div>

On 1/22/07, sayoyo [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > And if you’re going to use the page.visual\_effect method, more info
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
James Hearn

---

<div class="post-metadata">

**Author:** ![sayoyo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Post date:** [January 22, 2007, 5:43pm UTC](https://www.ruby-forum.com/t/where-are-the-doc-for-render-update-do-page/82160/5 "2007-01-22T17:43:28Z")

</div>

Hi, thanks you very much for the information!!!

> This was confusing for me too at first. It’s an instance of the  
> JavaScriptGenerator class:  
> [Peak Obsession](http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html)
> 
> And if you’re going to use the page.visual\_effect method, more info  
> about that is here:  
> [Peak Obsession](http://api.rubyonrails.com/classes/ActionView/Helpers/ScriptaculousHelper.html)
> 
> I think |page| is often used instead of |generator| to help you think  
> about what you’re doing to the web page, and worry less that you just  
> happen to be doing that indirectly by generating javascript.
> 
> Jeff  
> [softiesonrails.com](http://softiesonrails.com)
