On 2/1/07, Ansgar Brauner
<ansgarb-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
wrote:>
>
> Hi there,
>
> im working on a site where i want to upload some (up to 4) images with the
> rails plugin "act_as_attachment". Could anybody give me a hint,
how to
> design the view and the controller to process more then one upload field
> with act_as_attachment?
>
> thanks in advance
>
> regards
>
> purple_haze
It''s not the greatest code, but checkout how Mephisto handles it:
http://svn.techno-weenie.net/projects/mephisto/trunk/app/views/admin/assets/new.rhtml
http://svn.techno-weenie.net/projects/mephisto/trunk/app/controllers/admin/assets_controller.rb
More file fields are added with some javascript whammy jammy:
http://svn.techno-weenie.net/projects/mephisto/trunk/public/javascripts/mephisto/application.js
(look for hte Asset object).
--
Rick Olson
http://weblog.techno-weenie.net
http://mephistoblog.com
--~--~---------~--~----~------------~-------~--~----~
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---