Martin Fowler on Ruby 1

Posted by scientific on December 28, 2006

Universal Caution Symbol

As long as you are careful it’s really nice.
- Martin Fowler, on Ruby

Rails Params and Arrays 3

Posted by scientific on December 28, 2006


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…

Testing a single file in Ruby on Rails

Posted by scientific on December 21, 2006


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.

Continue reading…

Stubbing Ruby

Posted by scientific on December 15, 2006


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..

Continue reading…

Authentication in Rails using mix-in’s

Posted by scientific on December 13, 2006


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.

Continue reading…

SQL Logging in Rails

Posted by scientific on December 12, 2006


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.

Continue reading…