James Wilding Freelance Rails, Ruby, and iPhone Web App Developer

Archive for November 2009

has_one vs. belongs_to in Rails

Which to use? Consider your pets.
If I own a dog, round his neck is a tag with my name on. The tag is like the dog’s owner_id: I have_one dog, and the dog belongs_to me.
If the dog owned me, I’d have a tag round my neck with the dog’s name on. This would be crazy, [...]

Why Britain should celebrate Thanksgiving

Bear with me here, because it’s not as crazy an idea as you’d think.
I have friends from the US, so I’ve been reading up about Thanksgiving lately (my previous understanding of this important cultural event is based on various episodes of Friends). Aside from the fact that we don’t have any pilgrim fathers to celebrate [...]