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.
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. 🌟