Rails - Change Image Directory?
I've developed a simple app to display images in a series of subdirectories based on querystring input. (I more or less built my own Rails version of 360Works SuperContainer, for FileMaker.) I have copied a few test directories into public/images
and everything seems to be working just great, but this app needs to operate over upwards 开发者_StackOverflowof 60gb of images, and putting them all into the public/images
folder isn't going to really be feasible.
Other than hard-coding the path into my model, how can I set a configuration option to specify a different default directory for the images
folder?
I think you can change the asset_host field :
http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M001688
精彩评论