file_column and custom store_dir

View: New views
2 Messages — Rating Filter:   Alert me  

file_column and custom store_dir

by Dorian Mcfarland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
_______________________________________________
Rails mailing list
Rails@...
http://lists.rubyonrails.org/mailman/listinfo/rails

Re: file_column and custom store_dir

by william heartwell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Rails mailing list
Rails@...
http://lists.rubyonrails.org/mailman/listinfo/rails