concept command in category rails

appears as: commds, commd, command, Commds, commd, The commds
Flexible Rails: Flex 3 on Rails 2

This is an excerpt from Manning's book Flexible Rails: Flex 3 on Rails 2.

In Rails 2.0.2 and above the default database is SQLite; in Rails 2.0.1 and below it is MySQL. If you are using Rails 2.0.2 or above, you will need to say “rails -d mysql pomodo” in the following commands; if you are using Rails 2.0.1 or below you can just say “rails pomodo”. Since this book is using MySQL, I have modified the commands below to say “rails -d mysql pomodo” (since chances are you are following along using Rails 2.0.2 or above)—even though when I last ran these commands I was using Rails 2.0.1 and it was not necessary to do so.

c:\peter\flexiblerails\current\pomodo>mysql -u root -p
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6 to server version: 5.0.24-community-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| pomodo_development |
| pomodo_production  |
| pomodo_test        |
| test               |
+--------------------+
6 rows in set (0.00 sec)

mysql>

Note that we don’t need to modify the DestroyLocationCommand or the DestroyProjectCommand—those commands pass their event.data to delegate methods. Even though we’ll change the delegates, the commands themselves are unchanged.

9.6. Modifying the commands

Next, we’ll modify the commands that use the business delegates. This will be trivial.