Branches, Kristy - #46
Open
kristyh32 wants to merge 13 commits into
Open
Conversation
… customer id method for order created
|
Well done! Comprehension QuestionsIt seems like you're a little confused about many-to-one vs one-to-one relationships:
When saying whether or not something is one-to-many we look at the entire group. So even though a OverallWell done! Aside from needing more descriptive error messages everything looks great! |
kaidamasaki
reviewed
Sep 6, 2019
|
|
||
| def self.find(id) | ||
|
|
||
| Customer.all.find { |customer| customer.id == id} |
| if valid_statuses.include?(fulfillment_status) | ||
| return fulfillment_status | ||
| else | ||
| raise ArgumentError |
There was a problem hiding this comment.
You should include a message with your ArgumentErrors so the user knows what is wrong.
Suggested change
| raise ArgumentError | |
| raise ArgumentError.new("Invalid fulfillment status: #{fulfillment status}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Grocery Store
Congratulations! You're submitting your assignment.
Comprehension Questions
raise ArgumentError?.all&.findmethods class methods? Why not instance methods?OrderandCustomer. Is this relation one-to-one, one-to-many, or something else? How does that compare to the Solar System project?OrderandCustomertracked in the CSV file? How is it tracked in your program? Why might these be different?