rikas / zoho_hub

Zoho CRM API V2 Wrapper
MIT License
25 stars 30 forks source link

fixes #7: Response data should always be an array #8

Closed TimCummings closed 5 years ago

TimCummings commented 5 years ago

This changes Response.data to always return an array, even in the case of a single record, and adjusts BaseRecord accordingly.

Also, I noticed similar chunks of code in BaseRecord.where and BaseRecord.all and renamed some of the variables to highlight the similarity. As with Response, there may be a reason for the differences that I'm unaware of, but otherwise it could be refactored in the future to reduce code duplication.

rikas commented 5 years ago

Thanks @TimCummings, excellent work!