[Rails] Re: Refactoring RJS

2009-02-12 Thread Frederick Cheung
On 12 Feb 2009, at 02:59, David wrote: Hi Fred, thanks so much for your response, that is exactly what I was looking for. What do you mean by rjs can be a bit of a crutch? I mean that you can torture yourself for a long time trying to convince rjs to do something whereas you could get it

[Rails] Re: Refactoring RJS

2009-02-11 Thread Frederick Cheung
On 11 Feb 2009, at 10:41, David wrote: I have some RJS that could use some refactoring. I use the function called with afterFinish twice and Im wondering what the best way to refactor is. This is all inline rjs in the controller mind you: page.visual_effect :slide_down,

[Rails] Re: Refactoring RJS

2009-02-11 Thread David
Hi Fred, thanks so much for your response, that is exactly what I was looking for. What do you mean by rjs can be a bit of a crutch? What do you mean by rewriting the whole thing as a js function. You mean just something like resetVisibility() and then just reset both the end_drop and