[Rails] Re: Refresh automatically
Hi everyone!!!
I have some stupid questions.
> It's really not nearly as hard as you might be thinking:
>
> # Call get_averages and put its results in 'avg' every 10 seconds
get_average is a function that I have to create?? if it isn´t where(in
the controller, in the view...) and how I call it??
> # Generates:
> # new PeriodicalExecuter(function() {new Ajax.Updater('avg',
> '/grades/get_averages',
> # {asynchronous:true, evalScripts:true})}, 10)
> periodically_call_remote(:url => { :action => 'get_averages' }, :update
> => 'avg')
Where I have to generate that??
>
>Thanks a lot!!!
PD: I know that I´m a little atupid, but it´s the first time when I done
programming, I only know C code and it´s difficult for me adecuate mi
mind.
Thanks
--
Posted via http://www.ruby-forum.com/.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home