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:
> 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
>
> 2010/2/21 Ease Bus <ease...@gmail.com>
>
> > 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
> >
> > http://burm.net/2008/10/17/ruby-on-rails-polymorphic-paperclip-plugin-tutorial/
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Ruby on Rails: Talk" group.
> > To post to this group, send email to rubyonrails-t...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> > http://groups.google.com/group/rubyonrails-talk?hl=en.
> >
> >

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to