1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Must always return the options even if they werent converted

This commit is contained in:
David Heinemeier Hansson 2017-07-28 15:43:53 -05:00
parent 801b4eb465
commit 1f150e0218

View file

@ -12,7 +12,7 @@ module ActiveStorage
private
def convert_direct_upload_option_to_url(options)
options.merge('data-direct-upload-url': rails_direct_uploads_url) if options.delete(:direct_upload)
options.merge('data-direct-upload-url': options.delete(:direct_upload) ? rails_direct_uploads_url : nil).compact
end
end
end