-
Notifications
You must be signed in to change notification settings - Fork 61
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 find_by_id method #19
Comments
Good with me :) |
Nice suggestion. I'd opt to implement something more along the lines of |
@sirupsen I'll have some time over the next week to work on this. How far down the rabbit hole do you think we should go? I'm tempted to add at least these methods:
And I think it wouldn't be a huge lift to get from there to ActiveRecord-style query chains, like What do you think? Would also love to hear from @Meekohi, @theblang and @cbortz. |
I'm happy to go the AR-route. I'm wondering if we can lean on some of the AR-tooling, instead of re-inventing it from the ground up? I'm not super familiar with the APIs there, but e.g. being able to support validations and callbacks from those libraries would be neat. |
What are your thoughts on a
find_by_id
method that would mimic ActiveRecord in that it wouldn't throw an exception if the record is not found?The text was updated successfully, but these errors were encountered: