Skip to content
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

Kimberley Zell - Pipes - MediaRanker #40

Open
wants to merge 61 commits into
base: master
Choose a base branch
from

Conversation

kimpossible1
Copy link

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. self.top_ten(category) : This method will find the top ten of all Works by the category. First it finds all the Works of that category. Then it sorts them by count of votes. Then it reverses the sort to put the largest number of votes on top. Then it returns the first ten.
Describe how you approached testing that model method. What edge cases did you come up with? I tested that it works even if there are less than ten items. I also tested that it only returns items with the category inputed. I tested that it won't return more than ten items. I tested that the first item returned is the one with the most votes. I tested that it returns the Works in the correct order. And i tested that it works even if there are no Works.
Describe an edge case test you wrote for a controller In the Works controller tested how the app will respond if the work inputed does not exist (which could happen if it was deleted before the user completed an action on the work).
What are session and flash? What is the difference between them? Flash is temporary and will only last during that request. Session will last for the entire period of the session (for example while a user is logged in).
Describe a controller filter you wrote. I did not write one unfortunately. I could go back and add one but I did not have the time.
What was one thing that you gained more clarity on through this assignment? Working with several models, how the databases get set up with foreign keys etc, and testing. I also got more familiar with using partials.
What is the Heroku URL of your deployed application http://kimpossible-mediaranker.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? More time to get help/guidance from instructor and/or tutor is really important. Less other homework during the week of the project and more project time at school while help will be available. It is important to let students focus on this project. Schedule a tutor for the weekend. Make sure students can get foundation working before the weekend. More experience with deploying to heroku before this assignment so students are comfortable with deploying without help over the weekend.

…media by category, but it's not working. Updated current table to include number of votes
…p ten. Fixed issue in partial and works index html page. Dried up the code
…- issue was in describe block, I wrote work rather than Work. Caused tests to behave badly. Now working on works controller tests.
…controller tests. Fixed two tests that were not passing in works controller tests.
…ks incl error issues. Need to verify the edit page actually looks right soon (used same for as for show). Also created def index in users controller and matching test.
…ser index page. Currently do not have any users to view.
…iew yet. Added code for vote controller incl method to get all votes by user. Added tests to check vote methods working correctly.
…sions controller again. Then after reviewing notes again, decided probably not necessary for this project. Reviewed code in application view again and finally figured out the problem(s). Log in now seems to work properly.
…nd a good way to redirect back to page already on, and that way it also reflects session status. started editing code on User Index page now that have users
…rectly with foundation. I think there is an issue with my foundation.
@PilgrimMemoirs
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Well Done
Comprehension questions Well Done - define what "logged in" means technically, for example: session lasts until window is closed
General
Rails fundamentals (RESTful routing, use of named paths) Well done
Semantic HTML Mostly good - be mindful of indentation. Nice use of partial for lists
Errors are reported to the user Not all - login and creating a new work does not display any errors
Business logic lives in the models Well Done - nice work splitting the search logic into class methods for Work.
Models are thoroughly tested, including relations, validations and any custom logic Well done
Controllers are thoroughly tested Well Done
Wave 1 - Media
Splash page shows the three media categories Mostly good - ❗️ Controller methods should be calling the model methods, not the views.
Basic CRUD operations on media are present and functional Well Done
Wave 2 - Users and Votes
Users can log in and log out ❗️ Initial approach to logout was more appropriate, and had the right idea - instead of calling . delete on session, remember that it's a hash so reset the id by doing this instead: session[:logged_in_user] = nil.
The ID of the current user is stored in the session Well done
Individual user pages and the user list are present Well Done
A user cannot vote for the same media more than once Well Done
All media lists are ordered by vote count Well done - with splash page
Splash page contains a media spotlight Well Done - as noted above, make sure you call the model method in controller, not directly in view.
Media pages contain lists of voting users Well done
Wave 3 - Styling
Foundation is used appropriately Well Done
Look and feel is similar to the original Mostly good - Some missing details, like movie show layout
Overall
Redirects There's an issue with some redirects in controller methods, like Votes's create, preventing it from loading the works index. You cannot set status codes with redirects otherwise it will load the 'You are being redirected.' instead.
"can access fixtures" test This is not testing any of your application code, therefore is not needed. Fixtures do not need to be tested.
users controller test for login In the test, you need to make a request to the login path, instead of calling login on it's own.
Controller Tests for create action The idea is that the controller method is making the decision to create a new record, and to send the appropriate response - so you should not be calling .new or .create within a controller test. Work.new(work_data[:work]).must_be :valid? is something that should be tested in the model test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants