Skip to content

Stef - Carets#45

Open
SesameSeeds wants to merge 20 commits intoAda-C8:masterfrom
SesameSeeds:master
Open

Stef - Carets#45
SesameSeeds wants to merge 20 commits intoAda-C8:masterfrom
SesameSeeds:master

Conversation

@SesameSeeds
Copy link

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. I did not get a chance to write a custom method from scratch really, I believe most everything I tend to do at this point is piece meal from prior learning and projects.
Describe how you approached testing that model method. What edge cases did you come up with? Please see above.
Describe an edge case test you wrote for a controller I'm still slightly fuzzy on edge cases and worked on testing through tutoring, I believe my test for re-rendering the form if a book can't be created was one. Though I am sure with a bit more time I could have managed a few more thorough ones.
What are session and flash? What is the difference between them? Flash is a type of hash utilized to send one-time messages from controllers to views. Session is another type of hash utilized to keep track of a users session which ends normally when the browser is closed. However the data stored won't go away after the next request-response style, being instead, stored for an indefinite period of time.
Describe a controller filter you wrote. I did not as I understand, do this. I do see it is considered an optional enhancement.
What was one thing that you gained more clarity on through this assignment? How to use github. I thought I had a handle on this, but it turns out I did not have a full grasp, particularly when tired, to fix what I did when I accidentally committed the wrong thing to the wrong branch. NOW I know better, also next time I would probably make a comment in my code and just commit it to the right place instead of stupidly trying to delete it and make it right. Also, I learned how to fix my heroku issues, as well as, the favicon.
What is the Heroku URL of your deployed application https://stefs-media-ranker.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? I would definitely give more time, I know many people felt very rushed, myself included though for different reasons. We were short a day and that definitely could have made a difference for many people. I would also cover login and logout if possible, that was a bit tough. The last suggestion I would have, which in general would be an all around good thing for all projects, is more thorough understanding of git. Particularly trying to rectify wrong commits. This was a particular concern with the desire to try and create good git hygiene. In my case I created a branch and ended up committing some stuff to the wrong branch initially and thought that I understood how to delete it off the branch, instead I managed to delete the entire thing which in turn deleted all of my stuff in atom. I didn't even know that was a thing I could do, I thought it was just deleting the commit so I could re-commit. Needless to say I won't ever forget that, or having to stay up until 3 am trying to make it up and not making it through. On that note, I will be completing the rest throughout the day/night as I can because I was right there on getting to the votes when I did that and I'm pretty upset. However, at the very least, thus far it's primarily functional.

…e-bundle install due to unknown issue with text editor.
…n. Still can't run heroku but deploys on local host.
@tildeee
Copy link

tildeee commented Oct 18, 2017

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene x
Comprehension questions x
General
Rails fundamentals (RESTful routing, use of named paths) x
Semantic HTML x
Errors are reported to the user not shown at all
Business logic lives in the models x
Models are thoroughly tested, including relations, validations and any custom logic not passing and incomplete
Controllers are thoroughly tested only has works controller tests
Wave 1 - Media
Splash page shows the three media categories x
Basic CRUD operations on media are present and functional x
Wave 2 - Users and Votes
Users can log in and log out x
The ID of the current user is stored in the session x
Individual user pages and the user list are present x
A user cannot vote for the same media more than once voting doesn't work
All media lists are ordered by vote count voting doesn't work
Splash page contains a media spotlight absent
Media pages contain lists of voting users voting doesn't work
Wave 3 - Styling
Foundation is used appropriately used foundation classes
Look and feel is similar to the original no styling
Overall

@tildeee
Copy link

tildeee commented Oct 18, 2017

Hi Stef. These are the few big areas that you're missing functionality on that we consider a major learning goal for this project:

  • Voting, and sorting by voting
  • Validations and errors around making those errors show through flash
  • Testing (models)

I'm leaving a few comments below


if @user
session[:username] = @user.id
flash[:success] = "#{ @user.username } is successfully logged in"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sets messages onto flash, but is never accessed in the view


it "must be valid" do
value(user).must_be :valid?
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a valid test and it fails! A new User with the validations you've defined on it ( validates :username, presence: true ) would not be valid.

Also, I'd love to know what the method value does! I haven't seen that before.


it "must be valid" do
value(vote).must_be :valid?
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my other comment

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