Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

ndjndj
Copy link
Contributor

@ndjndj ndjndj commented Feb 21, 2024

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

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.

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!

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrykonchin
Copy link
Member

Thank you!

@andrykonchin andrykonchin merged commit cfa73ba into Dynamoid:master Feb 21, 2024
57 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants