photo gallery for each User

What is the fastest and easiest way to build a photo gallery for each user in my User model? I'd just like to have a very simple gallery for each user, perhaps limited to just 5 small photos each to display to other users of the site. I'd like to store them in the file system instead of the database. No multiple albums needed at this point. I've found the following two methods. They seem to be old. What's the latest approach on this? Can you recommend any others? Thanks.

1. attachment_fu http://www.sitepoint.com/forums/showthread.php?t=531644 2. paperclippolymorph Ruby On Rails Polymorphic Paperclip Plugin Tutorial | Burm.net

Or just http://github.com/thoughtbot/paperclip Here’s some inspiration for using paperclip to create a photo gallery (it has many galleries/albums per user though): http://www.joesak.com/2009/09/18/online-photo-gallery-payment-order-fulfillment-ruby-on-rails-tutorial/

Lasse

Lasse!

Thank you so much. I think I'll follow that example.

Lasse, thank you so much for the pointer. To help the next researcher, I am posting this tip. For Rails 2.3.5, when you follow Joesak example, you should delete both of the following lines in your photo or asset controller:

#session :cookie_only => false, :only => :create #skip_before_filter :verify_authenticity_token, :only => ['create', 'destroy']

Instead, follow the example below to make SWFUpload work with Rails session, i.e. to avoid the InvalidAuthenticityToken error: http://github.com/lardawge/swfupload-rails-authentication/tree/paperclip-example.

When you follow the example above, pay attention to the following:

1. Changes in the javascript in the photo views. 2. Changes in session_store.rb and environment.rb to refer to the app/ middleware folder, which you should copy from the example.

Good luck and have fun.

Lasse Bunk wrote: