[ARVADOS] created: a9ae80084e5b8897408a47fe081481cb913fd260
Git user
git at public.curoverse.com
Thu Jan 19 14:46:36 EST 2017
at a9ae80084e5b8897408a47fe081481cb913fd260 (commit)
commit a9ae80084e5b8897408a47fe081481cb913fd260
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Jan 19 14:45:39 2017 -0500
10935: Make Rails method deep_munge a noop, so that empty arrays can round trip
through json instead of being turned into 'nil'.
diff --git a/services/api/config/initializers/noop_deep_munge.rb b/services/api/config/initializers/noop_deep_munge.rb
new file mode 100644
index 0000000..abfa7e5
--- /dev/null
+++ b/services/api/config/initializers/noop_deep_munge.rb
@@ -0,0 +1,9 @@
+module ActionDispatch
+ class Request < Rack::Request
+ # This Rails method messes with valid JSON, for example turning the empty
+ # array [] into 'nil'. We don't want that, so turn it into a no-op.
+ def deep_munge(hash)
+ hash
+ end
+ end
+end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list