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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 <-- NOT a blog!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 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 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, thanks you very much for the information!!!!!> 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 > > 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 > > 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-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 1/22/07, sayoyo <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, thanks you very much for the information!!!!! > > > > > 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 > > > > 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 > > > > 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 > > -- > Posted via http://www.ruby-forum.com/. > > > >-- James Hearn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---