On 20 May 2008, at 11:53, Nathan E. wrote:
then?
Two ways…simple way is simply write the function in pure javascript
and then invoke it in the rjs…i.e page.call “someFunction”,
“param1”,
“param2”but what if I REALLY want to be able to dynamically evaluate ruby code
as part of the template…I have used a plugin called MinusMOR
Neat. Not surprising to see yet another excellent thing from Dan
Webb!. With the latest stuff I’ve been I doing I’ve taking to just the
writing the javascript statically.
Actions render :json (or just html fragments) and the ajax callbacks
on the other side put things together. With a good dose of prototype
javascript isn’t that bad. And I can write better unit tests for my
static javascript than I can for generated javacscript.
Fred
–
My ramblings: http://www.spacevatican.org