-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add reload method #491
Add reload method #491
Conversation
This is basically an alias of Do you have a use case? |
We have 2 use cases for it. The first is reloading a record in specs: person = Person.create
PersonUpdater.run
person.reload.field.should eq "new value" The second is in a distributed system when running more than 1 instance of the same service, you might want to reload the record in case another instance has updated the db record since it was loaded into memory. So yeah I agree it is just a convenience method, happy to go with your judgment 😊 |
Might I suggest renaming it to Or maybe I think resync/sync are better names but I think we can come up with something better if we thought about it. |
I think this would be helpful in the test suite, so let's wrap this in a macro that checks for the Can you also add the documentation to the code comments? Now that we have the crystaldoc.info I want to ensure we're writing docs that the community at large can consume in as many places as possible. |
Co-authored-by: jphaward <jphaward@gmail.com>
Co-authored-by: jphaward <jphaward@gmail.com>
80af7bd
to
72b01d4
Compare
6935e64
to
b1d2e5d
Compare
Sure thing all done. 1 questions about the docs, when running |
Co-authored-by: Seth T. <crimsonknightstudios@gmail.com>
Resolves #485