search for: options_for_render

Displaying 4 results from an estimated 4 matches for "options_for_render".

2006 Jul 03
1
plugin to add method to rjs "page" object
Hi, I would like to add a new method to the rjs "page" object through a plugin. For a simple example, suppose I want to add the following which is really just an alias for the usual page.replace_html. def replace_html2(id, *options_for_render) call ''Element.update'', id, render(*options_for_render) end How can I stitch this new method into the "page" object? Thanks, Peter
2006 Mar 14
2
RJS & Unicode (again)
I have a problem with unicode & RJS. I searched several boards & blogs, but was not able to find a solution. Let me explain my problem with an example. View (test.rhtml): ... <div id="a_test_div">?????????</div> ... Output: ????????? RJS-Template (an_action.rjs): page.replace_html ''a_test_div'', ''?????????'' Calling
2005 Dec 15
0
RJS Templates and the Replace semantics
...ide update. Add this code to the Application.rb (or in a separate file required by Application.rb): # Update the JavaScriptGenerator to add our own functionality module ActionView module Helpers module PrototypeHelper class JavaScriptGenerator def replace_html_element(id, *options_for_render) html = render(*options_for_render) record "Element.replace(#{id.inspect}, #{html.inspect})" end end end end end Add this code to your application javascript file: // Extend the object for our RJS extension to work Object.extend(Element, {...
2006 Jun 08
3
RJS wierdness - Content div display js code
Hi, I have a link_to_remote name ''Show notes'', which calls an action that uses this RJS template: page.replace "notes_remote", :partial => "notes/hide_notes_link" page.insert_html :top, "notes_list", :template => "notes/list" page.visual_effect :highlight, ''notes_list'', :duration => 3 Works great. The