-
Notifications
You must be signed in to change notification settings - Fork 1
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
DavRich-Recipe-App working prototype #24
base: main
Are you sure you want to change the base?
Conversation
Feature/project setup
Add Feature/recipe details
Feature/shopping list
Add documentation
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.
Hi @amon-cofie & @RichardChileya ,
Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!
Highlights ✔️
- No linter errors ✅
- Students solved N+1 queries problem ✅
- Descriptive pull request title and summary ✅
- Git flow is used correctly ✅
Required Changes ♻️
Check the comments under the review.
Optional suggestions
- [ Required ] I've noticed that the license link on your readme file is not working, it leads to a 404 page not found error. I would like to suggest that you fix this by adding
License
file in your root directory and provide a link to the license on the readme file. You can use the contents of theMIT
license on this link Click Here >>
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.
You can also consider:
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
Add testing
Feature/review project
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.
STATUS: CHANGES REQUIRED ♻️ 📌
Hi team 👋,
Great work on making the changes requested by the previous reviewer 👏
You've done well implementing some of the requested changes, but there are still some which aren't addressed yet.
Highlights 🎯
✔️ Descriptive PR
✔️ Used GitFlow correctly
✔️ No linter errors
Required Changes ♻️
Check the comments under the review.
- You have done well writing some tests for your application 👏 Please write tests for the models as well 😎
Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
## 📝 License <a name="license"></a> | ||
|
||
This project is [MIT](https://choosealicense.com/licenses/mit/) licensed. |
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.
- [OPTIONAL] In order to have a license file for your project, you need to create a file called
LICENSE
in the root of your project, edit it with the correct information, then link it like this 👇
This project is [MIT](./LICENSE) licensed.
def index | ||
@all_ingredients = RecipeFood.includes(:recipe, :food) | ||
@missing = @all_ingredients.select { |ing| ing.quantity > ing.foods.quantity } | ||
@missing_ingredients = @missing.map do |ingredient| | ||
{ | ||
name: ingredient.foods.name, | ||
quantity: ingredient.quantity - ingredient.foods.quantity, | ||
price: ingredient.foods.price * (ingredient.quantity - ingredient.foods.quantity) | ||
} | ||
end | ||
@total_price = @missing_ingredients.map { |ing| ing[:price] }.sum | ||
end |
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.
<%= form_with model: @recipe_new, url: recipe_recipe_foods_path do |f| %> | ||
<div class="form_control"> | ||
<%= f.label :quantity %> | ||
<%= f.number_field :quantity %> | ||
</div> | ||
|
||
<div class="form_control"> | ||
<%= f.select(:food_id, @foods.map{|u| [u.name, u.id]}) %> | ||
</div> | ||
|
||
<div class="form_control"> | ||
<%= f.hidden_field :recipe_id, value: @recipe_new.recipe_id %> | ||
</div> | ||
<%= f.submit "Submit", class:"btn btn-success" %> | ||
<% end%> |
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.
|
||
def configure_permitted_parameters | ||
devise_parameter_sanitizer.permit(:sign_up, keys: %i[name email password]) | ||
# devise_parameter_sanitizer.permit(:account_update, keys: %i[name email password photo bio]) |
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.
- Just as the previous reviewer recommended, please remove commented code in order to have a cleaner and less cluttered code base 👍
Feature/review project
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.
Hi @Team
Your project is complete! There is nothing else to say other than... it's time to merge it
Congratulations! 🎉
Highlights
- All changes requested have been implemented 🚀
Optional suggestions
Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.
You can also consider:
- N/A
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification @prolajumokeoni.
As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.
In this pull request my partner, @RichardChileya, and I, @amon-cofie did the following things listed in the project requirements: