aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
authorJason Lee <huacnlee@gmail.com>2018-02-08 10:15:55 +0800
committerJason Lee <huacnlee@gmail.com>2018-02-08 10:15:55 +0800
commit0625a2ba80476bf0139f2ecb9019dc2c82e4a7de (patch)
treec55afd7aa065c6ab062da03550932feff130793f /railties/lib/rails/commands
parent01c54e29bd288bf250b6e277046594f06b211a6f (diff)
downloadrails-0625a2ba80476bf0139f2ecb9019dc2c82e4a7de.tar.gz
rails-0625a2ba80476bf0139f2ecb9019dc2c82e4a7de.tar.bz2
rails-0625a2ba80476bf0139f2ecb9019dc2c82e4a7de.zip
Fix `blob.service_url` for supports string or nil `:filename` option.
- Make sure `blob.service_url` present a `ActiveStorage::Filename` type to `serivce.url`. - Add `ActiveStorage::Filename.wrap` method. before: ```rb blob.service_url(filename: ActiveStorage::Filename.new("new.txt")) blob.service_url(filename: "new.txt") => NoMethodError: undefined method `parameters' for "new.txt":String params = {} blob.service_url(filename: params[:filename]) => NoMethodError: undefined method `parameters' for nil:NilClass ``` after: ```rb blob.service_url(filename: "new.txt") blob.service_url(filename: nil) ```
Diffstat (limited to 'railties/lib/rails/commands')
0 files changed, 0 insertions, 0 deletions