Last week I lost several productive hours resetting my ‘insecure’ password on several websites due to a security breach at a website I haven’t used in more than a decade, if you’ve ever used that site, you’d be well advised to change your password pretty much everywhere. In order to prevent this happening...
Do it Later With Delayed Job.
As I mentioned in the post on managing file uploads, the most common cause of an unresponsive rails application is having some long-running requests consuming all your rails processes. For managing uploads and downloads you can off-load the time-consuming work to apache modules like mod-x-sendfile and modporter, but for areas where your application’s logic...
Taking Things Too Far: REST
I’m going to put up a few posts based on a talk I gave at RailsConf ‘09 in Vegas and RailsWayCon in Berlin. Sorry for the delay in updating but I wanted to deliver the talks before posting here.
There’s a common pattern I see when working on code-reviews with ActionRails or...
Updates
Just a few quick updates about what’s going on around here.
Sponsorship
New Relic have generously been sponsoring this site for a few months now. I’ve been a user of their RPM product for a while now and recommend it to all my clients, so when they offered to sponsor the site I was happy to...
Uploading Files
Anyone who’s built a rails application that deals with large file uploads probably has a few horror stories to tell about it. While some people love to overstate the issues for their own purposes, it’s still something that can be quite challenging to do well.
What’s the Problem?
As I mentioned in the article on File...
Controller Inheritance
Just a brief interlude from the File Management series while I sort out some time to do some benchmarking.
A common pattern I see in submissions and client-applications is repetitive declarations in controllers. There’s a neat and simple solution for this, but given how often Things like this:
class TodoController < ApplicationController ...
Storing Your Files
This is the second article in my series on file management, the third article will cover the challenges of handling uploads then we should be able to move on to some more advanced topics.
The second problem you’ll face when building an application to handle files is where and how to store them. Thankfully there...
File Downloads Done Right
Getting your file downloads right is one of the most important parts of your File Management functionality. A poorly implemented download function can make your application painful to use, not just for downloaders, but for everyone else too.
Thankfully it’s also one of the easiest things to get right.
The simple version
For the purposes of this...
File Management
One of the most common features for web applications I’ve built over the last 4 years doing rails is file management. Users download file attachments in almost every web application I use. Thankfully rails has a really capable suite of file management tools, and there are several great plugins to handle some of...
Requests Per Second
One of the most harmful things about people discussing the performance of web applications is the key metric that we use. Requests per second seems like the obvious metric to use, but it has several insidious characteristics that poison the discourse and lead developers down ever deeper rabbit holes chasing irrelevant gains. The...
@the_rails_way.awaken!
After more than 15 months since the last post, and constant questions from users, I’m finally ready to bring The Rails Way back from hibernation.
The challenge I had here was the amount of time involved. Review articles are incredibly time consuming, scouring an application for code to improve can take hours, making the changes...

