-
Notifications
You must be signed in to change notification settings - Fork 47
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
Space - Nora #37
base: master
Are you sure you want to change the base?
Space - Nora #37
Conversation
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.
Great job! Your code was generally quite clean and concise.
Here are a few tips for improving future projects. 😃
@import "**/*"; | ||
|
||
*,*::before,*::after { | ||
box-sizing: border-box |
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.
Wow, you strongly prefer border-box
sizing, huh?
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.
Also, even thought the trailing ;
is optional on the last entry it's strongly encouraged since it makes reordering and adding new rules easier.
} | ||
|
||
.user-votes__header { | ||
color: black |
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.
Generally speaking one should avoid color names because they can have browser compatibility issues. (black
and white
don't but it's still generally discouraged.)
font-size: 2.5rem; | ||
font-weight: 700; | ||
margin: 25px auto 40px auto |
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.
Indentation.
flash[:error] = 'You already voted for this work' | ||
end | ||
end | ||
redirect_back(fallback_location: root_path) |
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.
Nice use of redirect_back
!
@work = Work.find_by(id: params[:id]) | ||
if @work.nil? | ||
head :not_found | ||
return | ||
end |
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.
You do this in a number of places. In the future you should DRY things like this up by creating a controller filter.
<% flash.each do |name, message| %> | ||
<div class="alert alert-<%= name %>" > | ||
<span> | ||
<%= message %> | ||
</span> | ||
<% end %> |
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.
Indentation.
Media RankerFunctional Requirements: Manual Testing
Major Learning Goals/Code Review
Previous Rails learning, Building Complex Model Logic, DRYing up Rails Code
Testing Rails Apps
Overall Feedback
Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
Media Ranker
Congratulations! You're submitting your assignment!
Comprehension Questions
session
andflash
? What is the difference between them?