October 2006 Archives

Posted by Mike Mangino on Jul 11, 2006

Email delivery in test environments

ActionMailer is a really nice framework for sending email. It is wonderful to be able to set delivery to test mode and have messages stuck in an array instead of being delivered. What do you do in a staging environment where you actually want to see the messages, but don’t want them sent to the actual recipients entered? I’ll show you a simple way to solve this problem.

Continue Reading…

Posted by Mike Mangino on Oct 25, 2006

Simple tweaks to make testing easier

Rails does a great job of making testing easier. There are still a few things you can do to simplify testing via selenium. I’ll show a quick monkeypatch that makes testing error messages much easier.

Continue Reading…

Posted by Mike Mangino on Oct 13, 2006

Caching without extra parameters

After coming up with a nice solution to the problem of caching based upon subdomain keys, we got negative feedback from our first customer. They said the URLs made them feel like a number, and of course, they were right. Here’s how we solved the problem without putting the website_id in the url:

Continue Reading…

Posted by Mike Mangino on Oct 10, 2006

Caching with extra parameters

While premature optimization is often a serious problem for developers, there are certain places where it pays to think ahead. Rails provides a wonderful interface for caching, but there are a couple of key points to keep in mind to make sure you can take advantage of it. In this article, we will talk about query parameters and caching and how to easily move them into the url.

Continue Reading…

Posted by Mike Mangino on Oct 05, 2006