# File\_column and custom store\_dir

**URL:** <https://www.ruby-forum.com/t/file-column-and-custom-store-dir/57823>\
**Category:** Rails\
**Created:** [April 14, 2006, 3:51pm UTC](https://www.ruby-forum.com/t/file-column-and-custom-store-dir/57823 "2006-04-14T15:51:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tachekent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7993a0/32.png) [@tachekent](https://www.ruby-forum.com/u/tachekent)\
**Post date:** [April 14, 2006, 3:51pm UTC](https://www.ruby-forum.com/t/file-column-and-custom-store-dir/57823/1 "2006-04-14T15:51:33Z")

</div>

I’m using file\_column to store mulitple versions of an image in a custom  
directory “images/artwork/” with the :store\_dir option.  
This is working fine for uploading and storing the images, but whenever  
I try and access the images with the url\_for\_file\_column helper it keeps  
generating the default path. I thought it would replace this by default,  
but it doesn’t seem to.

I can hand code these in, but it seems a bit wrong and it feels like I  
must missing some crucial url\_for\_file\_column option. I can’t see any  
reason why you would want to set a custom :store\_dir if it isn’t used by  
the helpers!

maybe it’s a bug that needs fixing…

anyone else had this?

–  
I do things for love or money

---

<div class="post-metadata">

**Author:** ![tachekent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7993a0/32.png) [@tachekent](https://www.ruby-forum.com/u/tachekent)\
**Post date:** [April 15, 2006, 1:00pm UTC](https://www.ruby-forum.com/t/file-column-and-custom-store-dir/57823/2 "2006-04-15T13:00:52Z")

</div>

I agree that it would make a lot more sense for file\_column to default  
to using the the store\_dir as the base\_url but it doesn’t.

just put this in your declaration :base\_url =\> ‘mages/artwork’

and you should be in the money.
