Forum: Rails-core (closed, excessive spam) Variable name for periodically_call_remote

Posted by Herval (Guest)
on 2008-06-22 15:40
(Received via mailing list)
In our project, we had to assign a variable name to
periodically_call_remote, so that we could manipulate it using rjs/
javascript (for instance, calling stop()). The details are on this
ticket: 
http://rails.lighthouseapp.com/projects/8994-ruby-...

cheers,
Herval
Posted by Frederick Cheung (Guest)
on 2008-06-23 09:09
(Received via mailing list)
On 22 Jun 2008, at 14:39, Herval wrote:

>
> In our project, we had to assign a variable name to
> periodically_call_remote, so that we could manipulate it using rjs/
> javascript (for instance, calling stop()). The details are on this
> ticket: http://rails.lighthouseapp.com/projects/8994-ruby-...
>
is it worth allowing a little more flexibility? Eg I might want to
store the executor as a property of some other object. A flexible way
round this would be if you could supply a function and we'd call it
passing the brand new periodical executor. Can't decide whether I
think this would be overkill.

Fred
Posted by John D. Hume (Guest)
on 2008-06-25 23:34
(Received via mailing list)
It seems like those are both overkill over the current ability to do:
  var my_updater = <%= periodically_call_remote ... %>;
-hume.

On Mon, Jun 23, 2008 at 3:08 AM, Frederick Cheung
Posted by Herval Freire (Guest)
on 2008-06-25 23:52
(Received via mailing list)
You can't do that today, since periodically_call_remote generates a

<script>
 something
</script>

block... I wouldn't have come up with the patch if it did in fact work 
as
you said :-)

On Wed, Jun 25, 2008 at 6:33 PM, John D. Hume <duelin.markers@gmail.com>
This topic is locked and can not be replied to.