Acts_as_attachment with more than 1 image per model

Can I use acts_as_attachment with a model that has more than 1 image?

On 10/16/06, George [email protected] wrote:

Can I use acts_as_attachment with a model that has more than 1 image?

Each attachment is one image. Use a has_many association for multiple
attachments:

class PhotoAlbum < AR::Base
has_many :photos
end

class Photo < AR::Base
acts_as_attachment
belongs_to :photo_album
end


Rick O.
http://weblog.techno-weenie.net
http://mephistoblog.com

On 12/5/06, mixplate [email protected] wrote:

hello,
i a form where user can submit a photo, all i need to is just create
another field for the 2nd, 3rd,…image? or is it only 1 image i can
upload per form?

You can upload as many photos as you want. Check out how Mephisto
does it:

http://demo.mephistoblog.com/admin/assets/new (admin/admin to log in
to the demo)

http://svn.techno-weenie.net/projects/mephisto/trunk/app/controllers/admin/assets_controller.rb


Rick O.
http://weblog.techno-weenie.net
http://mephistoblog.com

hello,
i a form where user can submit a photo, all i need to is just create
another field for the 2nd, 3rd,…image? or is it only 1 image i can
upload per form?