Dynamoid / dynamoid

Ruby ORM for Amazon's DynamoDB.
MIT License
576 stars 197 forks source link

remove code sample that not exist as specifications in update method. #721

Closed ndjndj closed 6 months ago

ndjndj commented 6 months ago

※ related to #720 that closed it due to my ineptitude.

Hello, thank you for maintenance of this gem.

Probably related to issue https://github.com/Dynamoid/dynamoid/issues/657.

I found what incorrect code sample of update method in readme.md.

.update method does not accept conditions as arguments.

dynamoid/lib/dynamoid/persistence.rb

Line 232 in 6b96d1d

def update(hash_key, range_key_value = nil, attrs) Therefore, the following code as shown in the sample will fail.

Address.update(id, { city: 'Chicago' }, if: { deliverable: true }) So I removed this code sample.

thank you!

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6b96d1d) 90.89% compared to head (8a81cd2) 90.89%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #721 +/- ## ======================================= Coverage 90.89% 90.89% ======================================= Files 71 71 Lines 3414 3414 ======================================= Hits 3103 3103 Misses 311 311 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

andrykonchin commented 6 months ago

Thank you!