![]()
As long as you are careful it’s really nice.
- Martin Fowler, on Ruby
![]()
As long as you are careful it’s really nice.
- Martin Fowler, on Ruby

I still regularly bump up against a number of issues in Rails I don’t like but Rails is opinionated software so I’m learning to live with that. Either code around it or figure out the way Rails wants you to behave. Continue reading…

I am often running into a problem where I want to test a single function in Ruby on Rails. This used to amount to me building a command line custom statement that would test that file. Today I built a little Rake command that solves this problem once and for all.

Ruby is a great language for doing things in unexpected ways. I had such an occasion recently, where I wanted the functionality of a child object but without the hassle and time of setting one up. Plus, I wanted the data to be delivered from the parent object, so I didn’t want to worry about managing/syncing context or binding between the parent and the child..

I downloaded Rails Recipes by Chad Fowler today and was playing with the authentication recipe (#31). I like the book overall, and it’s got some good nitty-gritty solutions which are easy to implement.

Getting good SQL logs can be a pain, at least in PostgreSQL for Rails. Presumably other SQL logs are also cluttered with meta-data queries and other noise. To solve this problem I built a simple tool that (in development or test modes) will log your SQL commands to a file.