json_api_client
json_api_client copied to clipboard
Incorrect documentation for #create return value
The "Validation Errors" section of the readme says that create returns a falsey value on errors:
User.create(name: "Bob", email_address: "invalid email")
# => false
This is incorrect: create actually returns the set of attributes regardless of success status. This code comment above the create method is correct: https://github.com/JsonApiClient/json_api_client/blob/9b9835bab0c03d29209d6006ce7602da255bfcb1/lib/json_api_client/resource.rb#L168