module StringifyJsonPatch

Fix setting body to '{}' when it is blank

Public Instance Methods

build(env) click to toggle source
Calls superclass method
# File lib/checkr/canada/ext/stringify_json_patch.rb, line 5
def build(env)
  return env unless env[:format] == "json"
  new_env = super
  new_env.delete(:body_string) if env[:body].nil? || env[:body].empty?
  new_env
end