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

Add find_or_fail #211

Closed
josephmancuso opened this issue Oct 22, 2020 · 1 comment · Fixed by #213
Closed

Add find_or_fail #211

josephmancuso opened this issue Oct 22, 2020 · 1 comment · Fixed by #213
Labels
enhancement A feature that exists, works as intended but needs to be improved feature request A feature that does not yet exist but will be a good addition to the library

Comments

@josephmancuso
Copy link
Member

Should be a new method on the model class. If should execute the normal find method but if there is no results it should execute a new ModelNotFound Exception

@josephmancuso josephmancuso added enhancement A feature that exists, works as intended but needs to be improved feature request A feature that does not yet exist but will be a good addition to the library labels Oct 22, 2020
@josephmancuso
Copy link
Member Author

Also should put first_or_fail and find_or_404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature that exists, works as intended but needs to be improved feature request A feature that does not yet exist but will be a good addition to the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant