1.
Nested Resources in Rails 2
(Note that this is a significant change from Rails 1.2 syntax of passing a block to map.resources.) map.resources :events, :has_many => :tickets ...
2.
Nested Resources in Rails 2
Nested resources were introduced in Rails 1.2 and are touted as the Right Way to .... from Rails 1.2 is gone, replaced by scaffold in Rails 2. The original ...
3.
Nested Resources in Rails 2
That depends on whether you want the tickets to be accessible in a non-nested form (e.g. //1). Given that a ticket will always have an event, ...
4.
Pony, The Express Way To Send Email From Ruby
Want to fire off a quick email from your Ruby script? Finding ActionMailer to be overkill, but Net::SMTP to be…um, underkill? Envious of PHP’s mail(), ...
5.
Pony, The Express Way To Send Email From Ruby
Then take a deep breath, relax, and gem install pony. require 'rubygems' require 'pony' Pony.mail(:to => 'you@example.com', :from => 'me@example.com', ...
6.
Database Versioning
This loads schema.yml into a fresh database, and ignores migrations. Migrations are only used when transforming one version of the database into another ...
7.
DDL Transactions
I think the real reason there was resistance to this change is that MySQL doesn’t support DDL transactions; and wrapping migrations in a transaction is ...
8.
DDL Transactions
I think the real reason there was resistance to this change is that MySQL doesn’t support DDL transactions; and wrapping migrations in a transaction is ...
9.
rush, the Ruby Shell
I’ve wanted a Ruby-syntax replacement for the unix shell from almost the moment I began using Ruby. Whenever I can, I write shell scripts as Ruby scripts ...
10.
REST Enlightenment
(I like to call the input body the “payload,” which makes its purpose much .... action, verb + resource, payload. rename, PUT /apps/myapp, content-type: ...