lib/pupil/essentials.rb in pupil-0.6 vs lib/pupil/essentials.rb in pupil-0.6.1

- old
+ new

@@ -48,20 +48,20 @@ response = @access_token.get(url+param_s).body rescue => vars raise NetworkError, vars end result = JSON.parse(response) - return (result["error"].nil? rescue true)? result : false + return (result["errors"].nil? rescue true)? result : false end def post(url, param={}) param_s = serialize_parameter(param) begin response = @access_token.post(url+param_s).body rescue => vars raise NetworkError, vars end result = JSON.parse(response) - return (result["error"].nil? rescue true)? result : false + return (result["errors"].nil? rescue true)? result : false end end end \ No newline at end of file