Closed SammyLin closed 8 years ago
Most of the code in both path is the same, except we're calling url
or public_url
right? Want to just do an if else on that method call instead?
You're right, but I actually have problems in Fog::Storage::Local::Files.
Because fog-local without url
method in file model, I want try to modify url
to public_url
but i am afraid that affect other plgin.
ref https://github.com/fog/fog-local/blob/master/lib/fog/storage/local/models/file.rb
oh i'm not looking to modify Fog::Storage::Local::Files
. but in Attache::VHost#storage_url
i'll just detect respond_to?(:url)
and invoke either or
https://gist.github.com/choonkeat/bc278e10af721ba95c14 (also, added a spec)
what do you think?
cool~ it's OK~
superceded by bbf4a1f #30