-
Notifications
You must be signed in to change notification settings - Fork 14
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
Elseabay #23
base: elseabay
Are you sure you want to change the base?
Elseabay #23
Conversation
rates = ups.merge(usps) | ||
render :json => rates.as_json, :status => :ok | ||
rescue | ||
render :json => { error: :bad_data, message: "You must provide valid data for package size, package weight, origin location and destination location." }, status: :bad_request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a bad idea to let users know what 'valid date' is by giving them examples in the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most Ruby style guides recommend a line length of 80 characters. You can wrap your code by using indentations to show the continuance of the previous line. Here is a StackOverflow example
@lgranger @emgord Great job on your very first API! insert virtual high fives heres The nit pickiness of my code review is a testament to the fact that there wasn't any major refactoring to be done or major holes in your code. 🌟 If you have any questions about any of my comments please don't hesitate to reach out. |
https://trello.com/b/uE3b61qg/c2c-shipping