carrierwave
https://github.com/carrierwaveuploader/carrierwave
Ruby
Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
CarrierWave::Uploader::Store#store_path
Calculates the path where the file should be stored. If +for_file+ is given, it will be used as the filename, otherwise +CarrierWave::Uploader#filename+ is assumed. === Parameters [for_file (String)] name of the file <optional> === Returns [String] the store path
Edit
git clone [email protected]:carrierwaveuploader/carrierwave.git
cd carrierwave
open lib/carrierwave/uploader/store.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-CarrierWave--Uploader--Store-store_path-for-pr
# Commit to gitgit add lib/carrierwave/uploader/store.rbgit commit -m "better docs for CarrierWave::Uploader::Store#store_path"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-CarrierWave--Uploader--Store-store_path-for-pr
hub pull-request
# Celebrate!