Forum: Ruby on Rails file_column and custom store_dir

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
F719c6cb34bd5b691c12b373b7244b4d?d=identicon&s=25 Dorian Mcfarland (tachekent)
on 2006-04-14 15:51
(Received via mailing list)
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
60360c90e1c5254adaeddbd583ce7304?d=identicon&s=25 Guest (Guest)
on 2006-04-15 13:00
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.
This topic is locked and can not be replied to.