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
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',
Instead, follow the example below to make SWFUpload work with Rails
session, i.e. to avoid the InvalidAuthenticityToken error:
When you follow the example above, pay attention to the following:
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: