# Attachment\_fu path

**URL:** <https://www.ruby-forum.com/t/attachment-fu-path/109988>\
**Category:** Rails\
**Created:** [July 20, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/attachment-fu-path/109988 "2007-07-20T22:59:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcgrigsby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b5e925/32.png) [@dcgrigsby](https://www.ruby-forum.com/u/dcgrigsby)\
**Post date:** [July 20, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/attachment-fu-path/109988/1 "2007-07-20T22:59:59Z")

</div>

Hi, I was wondering if there was anyway to add a user’s id to the file  
path of all images uploaded.

Currently I’m using the following function in my image model to set the  
file path:

def full\_filename(thumbnail = nil)  
file\_system\_path = (thumbnail ? thumbnail\_class :  
self).attachment\_options[:path\_prefix].to\_s  
File.join(RAILS\_ROOT, file\_system\_path, thumbnail\_name\_for(thumbnail))  
end
