Forum: Ruby on Rails attachment_fu has_attachment model logic reasoning?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
6084ba186cb1b878a8eeee509ddaf71f?d=identicon&s=25 Chris Dekker (chrisdekker)
on 2009-03-06 15:03
Both Attachment_fu and Paperclip use something like 'has_attachment' to
work their magic on an existing model like a User in the context of a
profile picture or something like that.

I find this idea pretty constricting, as it doesn't allow for multiple
profile pictures for example. Or at least I wouldnt know how to set this
up with either of the 2 plugins.

I am currently building a very simple dropsite for pictures to share
with other people. There is no User or something like that to attach a
picture to. Right now I am just looking for a way to have records
represent my photos. Maybe later ill couple them to users, albums, or
something else arbitrary.

It seems that the plugins are set up way too complex for this simple
task. Am I missing something from these plugins, or is it just easier to
write something from scratch to accomplish this? Because I do like the
thumbnailing of these plugins. I have no problem using RMagick
(Something Paperclip is very proud of to do without?)

Thanks in advance for clearing up this misconception of the attachment
6883e5ef03484d4fcef507d7b4f1d243?d=identicon&s=25 Matt Jones (Guest)
on 2009-03-06 21:51
(Received via mailing list)
The idea in most of these is one DB record maps to one file. So a user
with multiple pictures would just have

has_many :assets

and then Asset would have the has_attachment statement.

--Matt Jones

On Mar 6, 9:03 am, Chris Dekker <>
This topic is locked and can not be replied to.