Yesterday I was using attachment_fu to attach photos to a couple of models. Since attachment_fu requires you to create an extra model for the photo, you usually have a one to one relationship between the model and the photo.
But now that you have two models you also have to deal with these in your controller and views, something along the lines of this:
Sort of ugly if all you want is to add a photo to the Project model. But fear not, after adding the following piece of code to your model, you can transparently assign the photo to your project model in the view:
The tweaked model:
Now you can use a standard view:
And a standard controller:
(credits to this railscast for the idea of using a virtual attribute, I only added a bit of sugar for attachment_fu)