Must always return the options even if they werent converted

上级 801b4eb4
......@@ -12,7 +12,7 @@ def file_field(object_name, method, options = {})
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册