-
Notifications
You must be signed in to change notification settings - Fork 0
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
Milestone 8: views integration specs and fix n+1 problem on 'post#index' action #8
Milestone 8: views integration specs and fix n+1 problem on 'post#index' action #8
Conversation
- Now the spec will test each post's comments text.
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 & @demesameneshoa, 👋 👋
Your project is complete! Great job for following the project requirement🥇. There is nothing else to say other than... it's time to merge it 🍾🚢 . Congratulations! 🎉💯🌟
Good Points 👍
- Descriptive Pull Request title & summary. ✔️
- integration specs for views and fix n+1 problems ✔️
- Good use of Git flow ✔️
Optional changes
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.
Cheers..Happy coding!..and keep soaring higher! 💻 🍷 🚀
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me @brainconnect93 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 2 more limited reviews per this project. If you think that the code review was not fair, you can request a second opinion using this form.
Hi @brainconnect93 Afolabi!Thank you so much for having reviewed our PR 😃 🥂 and for contacting me over Zoom to check tests and snapshots. Wish you a great week and happy programming! |
Pull Request Summary for Milestone 8 Completion
Added:
/spec/views/post_index_spec.rb
Post
index view were added according to the requirements of the project/spec/views/post_show_spec.rb
Post
show view were added according to the requirements of the project./spec/views/user_index_spec.rb
User
index view were added according to the requirements of the project./spec/views/user_show_spec.rb
User
show view were added according to the requirements of the project.Modified:
/README.md
Integration specs for Views and fixing n+1 problems
task as completed./app/models/user.rb
includes
method was added to theUser
model to avoid n+1 queries at themost_recent_posts
method.📸 Screenshots of n+1 queries before and after the changes:
Before:
After:
/app/views/posts/_posts.html.erb
This way, we can test specific posts when we run the integration tests.
/app/views/shared/_user_card.html.erb
capitalize
method from theuser.name
attribute.Since before it was downcasing the rest of the name. For example,
Arthur Emanuel
was being displayed asArthur emanuel
. Making the integration tests fail, because theuser.name
attribute was not matching theuser.name
attribute from thePost
model./db/seeds.rb
avatar (photo)
for each user.rand
method with a range of 1 to 5./spec/examples.txt
passed
specs entries were added to the file.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. 🌟