Prev | Current Page 135 | Next

David Berube

"Practical Reporting with Ruby and Rails"

..
For this example, you??™ll use a project called Open Flash Chart. It??™s open source, unlike
many other Flash charting components, so you can use it on any size project without
paying licensing fees. Obtain Open Flash Chart from http://teethgrinder.co.uk/
open-flash-chart/. Unzip it into a temporary directory. Next, copy the open-flash-chart.
swf file from the root of the ZIP file into a new directory into your Rails application:
public/flash.
You??™ll also use the Flash Object plug-in, which helps you include Flash objects in
your views. Install this plug-in using the following command:
ruby script/plugin install http://lipsiasoft.googlecode.com/svn/trunk/
flashobject_helper/
Now you can start generating your code.
Creating the Controller for the Graphical Report
Begin by generating a single controller, home, using the following command:
ruby script/generate controller home
CHAPTER 5 n CONNECTING YOUR REPORTS TO THE WORLD 92
exists app/controllers/
exists app/helpers/
create app/views/home
exists test/functional/
create app/controllers/home_controller.


Pages:
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
Brian May wyniki na żywo tekstowo remonty silników elektrycznych M-People