Prev | Current Page 147 | Next

David Berube

"Practical Reporting with Ruby and Rails"

rb file.)
The Ajax.Updater call has three important optional parameters passed to it:
??? The first is evalScripts, which ensures that JavaScript code passed by the
Performance controller is executed. By default, code retrieved by Ajax.Updater
is not executed.
??? The second is the method parameter. By default, Ajax.Updater uses a POST request,
and since this is a read-only request that does not affect the state of the database, it
should be a GET request.
CHAPTER 5 n CONNECTING YOUR REPORTS TO THE WORLD 102
??? The third is a callback, onComplete, which will run when Ajax.Updater has finished
updating the control. This is a small fix for a bug in the Flash Object plug-in, which
results in a ???You do not have Flash installed??? message appearing while the page is
loading. To avoid the problem, you wait 400 milliseconds to redisplay the chart
component.
Next, let??™s take a look at the Performance controller (Listing 5-12):
class PerformanceController < ApplicationController
def show
@player = Player.find_by_id(params[:player_id])
@game = Game.


Pages:
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
hotele Meck filmy w sieci Paul McCartney MC Hammer