# Attachment\_fu and inheritance

**URL:** <https://www.ruby-forum.com/t/attachment-fu-and-inheritance/146416>\
**Category:** Rails\
**Created:** [August 20, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-inheritance/146416 "2008-08-20T21:09:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gormo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@gormo](https://www.ruby-forum.com/u/gormo)\
**Post date:** [August 20, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-inheritance/146416/1 "2008-08-20T21:09:01Z")

</div>

Hello,

I have the following class hierarchy

Attachment \< Image \< SpecialImage .

An Attachment should be a plain attachment (anything should be allowed)  
where an Image should be an image (obviously 😉 ). SpecialImage is a  
special Image with additional metadata.

I modeled this using single table inheritance, and am now wondering  
about the correct usage of has\_attachment in the models.

Should I call has\_attachment in all the three model classes? If so, then  
with what parameters?

Or should I modify self.attachement\_options (the attachment\_fu options  
hash) in the subclasses?

Thanks for your help,  
Gormo
