Private Downloads with attachment_fu and nginx

August 15, 2008

So, you’re using attachment_fu to handle user file uploads in your rails app, right? If you’re also using Nginx for your web server, here’s a quick and dirty way to do controlled file access in less than 10 lines of code.

Read the rest of this entry »


Dynamic Dialogs with Rails and YUI

June 26, 2008

This tutorial is a followup to Instant Shiny Forms with Rails and YUI, with a bit more of an interesting technique that (I think, at least) really demonstrates where YUI shines. In the last tutorial, we embedded a hidden form in a “show” view, so we could render a YUI dialog instead of loading the edit page separately, or using a technique like in-place editing. While this is useful, I find it to be of somewhat limited utility. In this article I’ll demonstrate a technique to move that dialog to the index view using the Yahoo Connection Manager, so we can skip the show step all together. Read the rest of this entry »

Instant Shiny Forms with Rails and YUI

June 7, 2008

This tutorial will demonstrate how to convert standalone Ruby on Rails forms to a YUI dialog (hey, it’s one less page load) in only 4 easy steps.

We’ll start with a quick and dirty (and all scaffold) blogging app. I assume you know a thing or two and don’t need me to walk through this. You’ll note that there are no changes required to your controllers to make this work.

Read the rest of this entry »