Hobo Cookbook

View Source

Question: Question Attaching/uploading multiple pictures to a model

Asks salamandyr
I'd like a recipe that walks through how to associate multiple image uploads with a single model instance, e.g. allow browse/attach for one to many images when adding a new item to a model, or editing an existing item in the model.

Thanks! :)

Discussion

  • Oddly enough, there's example code doing just that in the cookbook (it appears to be disabled but seems otherwise complete).

    Check the source, (top left) under app/models/image.rb and app/views/recipes/edit.dryml. If you can handle getting a single image upload working, this will point you in the direction to be able to handle multiple.