In Rails 2.2, if you include a belongs_to or references column in a call to the model generator, it will automatically add the belongs_to declaration to the model, as well as creating the foreign key column in the migration.

For example, run this from the command line:

script/generate model order order_date:datetime customer:belongs_to

And you'll find that the generated Order model looks like this:

[sourcecode language='ruby']
class Order < ActiveRecord::Base
belongs_to :customer
end
[/sourcecode]

Nothing earthshaking, but it will save you a few keystrokes.

Personally, I think we ought to explore the possibilities of making the model generator much more full-featured. I don't see any reason why it couldn't build validations, associations, and accessibility declarations at generation time. As a first step on this road, I've submitted a Rails patch. If you like the idea (and you've got a copy of edge hanging around), go give it a try and let me know what you think.