Dynamoid / dynamoid

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

Incorrect code sample of update method in readme.md #720

Closed ndjndj closed 6 months ago

ndjndj commented 6 months ago

Hello, thank you for maintenance of this gem.

Probably related to issue #657.

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

.update method does not accept conditions as arguments.

https://github.com/Dynamoid/dynamoid/blob/6b96d1d9cb8cb6d011cc84d1ca4cc65f43d6a729/lib/dynamoid/persistence.rb#L232

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 (a5b7640) 90.89% compared to head (d9dd786) 90.89%. Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #720 +/- ## ======================================= 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! Could you please rebase the branch on master?

ndjndj commented 6 months ago

I’m sorry. Is this correct?

andrykonchin commented 6 months ago

Could you please squash all commits into one? I would do it myself and push with force into your branch but it seems it's not permitted.

ndjndj commented 6 months ago

I'm sorry but I accidentaly broke branch. I apologize for the repeated trouble. I will create a new branch and submit a new pull request.