Module: StringifyJsonPatch
- Defined in:
- lib/checkr/canada/ext/stringify_json_patch.rb
Overview
Fix setting body to ‘{}’ when it is blank
Instance Method Summary collapse
Instance Method Details
#build(env) ⇒ Object
5 6 7 8 9 10 |
# 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 |