-
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
Issue #13 🎫: Food list and form #19
Conversation
- Require user authentication for all actions. - Add 'current_user' to 'foods#create' action. - Replace notices with flash messages. - Remove 'user_id' from private 'foods#food_params'.
- Also wrap yield in a div with class 'container'.
- _food partial. - _form partial. - index view. - new view.
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: APPROVED 🟢
Hi @ITurres 👋,
Your ticket 🎫 is complete! There is nothing else to say other than... it's time to merge it
Congratulations! 🎉
To Highlight 🎉
- Good job with Food View and Controller. ✔️
- Good job using partials. ✔️
- No linter errors. ✔️
- PR has a good title and summary. ✔️
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 with @demesameneshoa in your question so I can receive the notification.
Pull Request Summary for Issue #13 Completion
Added:
Modified:
/app/controllers/foods_controller.rb
food#index
action to load all foods from db that belong to the current user.food#create
action to assigned the current user to the food being created./app/models/food.rb
total_price
to calculate the total price of the food based on the quantity and price./app/views/foods/_food.html.erb
/app/views/foods/_form.html.erb
/app/views/foods/index.html.erb
/app/views/foods/new.html.erb
/app/views/layouts/application.html.erb
/spec/factories/foods.rb
faker
gem to generate fake data.user
attribute with the user factory./spec/factories/users.rb
faker
gem to generate fake data.confirmed_at
attribute to the user factory to avoid theunconfirmed user
error when creating a new food item and testing./spec/models/food_spec.rb
/spec/views/foods/index.html.erb_spec.rb
foods#index
view.Thank you for reviewing this PR. Feel free to reach out on Slack as Arturo (Arthur) Emanuel Guerra Iturres for any queries or further assistance. 🌟