# Attachment\_fu Validation Error

**URL:** <https://www.ruby-forum.com/t/attachment-fu-validation-error/152786>\
**Category:** Rails\
**Created:** [November 7, 2008, 12:13pm UTC](https://www.ruby-forum.com/t/attachment-fu-validation-error/152786 "2008-11-07T12:13:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaosbanane](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Post date:** [November 7, 2008, 12:13pm UTC](https://www.ruby-forum.com/t/attachment-fu-validation-error/152786/1 "2008-11-07T12:13:04Z")

</div>

Hi there!

I am trying to get attachment\_fu to work. It is so good as done, just  
one strange error is still there.

this is my model:

* * *

class Motorbike \< ActiveRecord::Base

has\_attachment :content\_type =\> :image,  
:storage =\> :file\_system,  
:max\_size =\> 500.kilobytes,  
:resize\_to =\> ‘800x600\>’,  
:thumbnails =\> { :thumb =\> ‘100x100\>’ }

validates\_as\_attachment

validates\_presence\_of :brand

end

* * *

If there is an other validation instead of the attachment\_fu the model  
pop up this error:

ActiveRecord::RecordInvalid in MotorbikesController#create  
Validation failed: Brand can’t be blank

If there is only the attachment\_fu validation, everything works great.

What could be the reason or is there a good way around?

Greenting Chaos
