Dynamoid / dynamoid

Ruby ORM for Amazon's DynamoDB.
MIT License
580 stars 195 forks source link

Add after_find callback #645

Closed andrykonchin closed 1 year ago

andrykonchin commented 1 year ago

Changes:

after_find callback works in the same way like it does in Rails. It's called after after_initialize at loading a model from DynamoDB.

The following methods trigger it:

https://guides.rubyonrails.org/active_record_callbacks.html#after-initialize-and-after-find

codecov[bot] commented 1 year ago

Codecov Report

Merging #645 (c425697) into master (47d9492) will increase coverage by 0.01%. The diff coverage is 100.00%.

:exclamation: Current head c425697 differs from pull request most recent head 9806467. Consider uploading reports for the commit 9806467 to get more accurate results

@@            Coverage Diff             @@
##           master     #645      +/-   ##
==========================================
+ Coverage   90.27%   90.28%   +0.01%     
==========================================
  Files          61       61              
  Lines        3136     3141       +5     
==========================================
+ Hits         2831     2836       +5     
  Misses        305      305              
Impacted Files Coverage Δ
lib/dynamoid/components.rb 100.00% <100.00%> (ø)
lib/dynamoid/criteria/chain.rb 99.58% <100.00%> (+<0.01%) :arrow_up:
lib/dynamoid/finders.rb 94.84% <100.00%> (+0.22%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

github-actions[bot] commented 1 year ago

Code Coverage

Package Line Rate Health
dynamoid 90%
Summary 90% (2836 / 3141)

Minimum allowed line rate is 90%