I ended up spending most of yesterday writing what turned out to be about 6 lines of controller and 20 lines of view. I'm not sure whether to be proud of my skills at condensing things down or appalled that it took me so long to find the reasonably elegant Rails way of doing things. But I met the customer's deadline.