Prev | Current Page 340 | Next

David Berube

"Practical Reporting with Ruby and Rails"

0000s
== CreateGrades: migrated (0.0000s) ===========================================
== CreateTrainingClasses: migrating ===========================================
-- create_table(:training_classes)
-> 0.0150s
== CreateTrainingClasses: migrated (0.0150s) ==================================
Next, add some data to your training_classes table, as shown in Listing 12-16.
Listing 12-16. Training Class Table Data (db/data/training_class_data.sql)
INSERT INTO training_classes (name)
VALUES ('Practical Exopaleontology'),
('Pro Quantum Biology');
Make a directory called data under the db directory, and save this as db/data/
training_class_data.sql. Import it with the following command:
mysql training_development < db/data/training_class_data.sql
Next, set up your routes, as shown in Listing 12-17.
Listing 12-17. Routes File (config/routes.rb)
ActionController::Routing::Routes.draw do |map|
map.root :controller => "homepage"
map.connect '/log', :controller => 'log',
:action => 'index', :format => 'xml'
map.connect ':controller/:action/:id.


Pages:
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352
Matchbox Twenty Malcolm McLaren Martika George Michael baseny ogrodowe