Chris Wanstrath
Cheat!
over 5 years ago by Chris Wanstrath on Err The Blog. [Linked from: RubyNoob, RubyNoob]
I’ve got this cheat sheet hanging on my wall. It’s for migrations. The Rails kind. It’s nice. I can never remember whether the method...
Back Double At Ya
over 5 years ago by Chris Wanstrath on Err The Blog.
I’ve been playing a lot with class variables (aka ‘the double at’) lately. They’re very interesting. How comfortable are you with...
Streaming Capistrano
over 5 years ago by Chris Wanstrath on Err The Blog.
Mike Clark showed off a cool Capistrano trick at RailsConf 2006 and I needed (okay, wanted) to do it today. He showed us that, using Capistrano, you can...
Accessor Missing
over 5 years ago by Chris Wanstrath on Err The Blog.
A recent thread on the Rails mailing list grappled my attention: how do association accessor methods work, how do attribute accessor methods work, and what...
Camping with Dr Nic
over 5 years ago by Chris Wanstrath on Err The Blog.
By now everyone has heard of Dr Nic’s Magic Models, the library which automagically creates your models, associations, and (some) validations in Rails...
Friday Hash Fun
over 5 years ago by Chris Wanstrath on Err The Blog.
Hey, it’s Friday. Let’s play with hashes. First up: how to build a hash from an array? Fairly straightforward. Make sure your array is...
Colored Tests
over 5 years ago by Chris Wanstrath on Err The Blog. [Linked from: Gluttonous, has_many :through]
In case you missed it, Pat Eyler released a nugget known as RedGreen back in May. It adds color to your bland testing lifestyle. Read that post if you...
acts_as_textiled
over 5 years ago by Chris Wanstrath on Err The Blog.
I really like Textile. I think everyone does. Even if not, I like to pretend everyone does. What I want is an easy way to turn Textile into HTML on...
Block to Partial
over 5 years ago by Chris Wanstrath on Err The Blog.
We’ve all seen helper methods that take blocks. They’re super useful. Recently, Brandon Keepers wrote about overriding link_to to accept a...
case when else end
over 5 years ago by Chris Wanstrath on Err The Blog.
I’ve seen this question pop up more than a few times in #ruby-lang. For sooth, I hit this wall once myself: why is my case statement broken? ...
