Ruby

Swimming in code: recent hacks

Tagged:  •    •    •    •    •    •  

Recently I've been on a hacking high, touching a lot of code, and in touch with a lot of cool programmers. In retrospect I'm surprised at the variety of stuff I've been doing, so I thought I'd write a short list.

Adding Array#to_proc to Ruby

Tagged:

Here's a neat Ruby trick for fans of Symbol#to_proc.

Rails tip: easily browse and search logs in colour with "less"

Tagged:  •    •  

'less' is a great tool for browsing Rails log files, though you might not guess it if you try to view your "development.log" with it.

In Praise of Haml

Tagged:  •    •  

Our big celebrity charity news site runs on Rails, and I've just switched all the view code from erb to haml. I cut the total number of lines of view code from 2370 to 1788, which makes for a saving of 25%.

Rails gets new dbconsole script

Tagged:  •    •    •    •    •  

I'm happy to announce that my db_console plugin for Rails has just been added to Rails Core.

Generate an HTML index of your ruby gem rdocs

Tagged:  •  

Rubygems is kind enough to generate RDoc for installed gems, but the directories move as the gem versions evolve, and it's inconvenient to keep browsing for them. This tool produces a useful HTML index with direct links to the RDocs for all the gems installed on your system.

Syndicate content