# Acts\_as\_attachment save file in folder named after models pa

**URL:** <https://www.ruby-forum.com/t/acts-as-attachment-save-file-in-folder-named-after-models-pa/91402>\
**Category:** Rails\
**Created:** [April 8, 2007, 1:38pm UTC](https://www.ruby-forum.com/t/acts-as-attachment-save-file-in-folder-named-after-models-pa/91402 "2007-04-08T13:38:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![teesea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@teesea](https://www.ruby-forum.com/u/teesea)\
**Post date:** [April 8, 2007, 1:38pm UTC](https://www.ruby-forum.com/t/acts-as-attachment-save-file-in-folder-named-after-models-pa/91402/1 "2007-04-08T13:38:15Z")

</div>

This is probably pretty easy, but I’m still a newb as far as ruby and  
rails goes.

I am using the acts\_as\_attachment and would like to know how I go  
about setting the path that the file is saved to so that it is saved  
in a folder named after the models parent model id

Thanks in advance

Tony

---

<div class="post-metadata">

**Author:** ![teesea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7feea3/32.png) [@teesea](https://www.ruby-forum.com/u/teesea)\
**Post date:** [April 9, 2007, 3:06pm UTC](https://www.ruby-forum.com/t/acts-as-attachment-save-file-in-folder-named-after-models-pa/91402/2 "2007-04-09T15:06:48Z")

</div>

After having another dig around found the answer so I thought I’d post  
it

All you need to alter is the full\_filename method in  
file\_system\_methods.rb file to the path you want
