Refactored by pushing decsions down to response render_json method
Update attributes already saves the response object