-
Notifications
You must be signed in to change notification settings - Fork 7
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
Betsy Complete - Team Fuzzy #12
base: fuzzy/master
Are you sure you want to change the base?
Conversation
end | ||
|
||
def update | ||
my_order |
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 could create a before action to call my_order for checkout and update.
From what I looked over, your code looks good. You're using advanced techniques and shortcut methods, and it's clear you understand complicated logic. My challenge for you for your next projects is to focus on clarity over complicatedness. Try to think about a dev reading your code who didn't have anything to do with writing it, and work to write it clearly enough that that future dev could understand it. This means leaving comments when logic is too broad for its purpose to be apparent, being careful about your formatting (white space, indenting), questioning whether you need a 👍 Keep up the good work! |
session[:message] = "You have created a new category: #{@category.name}" | ||
redirect_to user_path(user_id) | ||
else | ||
if @category.errors.messages[:name].include? "can't be blank" |
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.
Neat conditional error messages. Glad that you dug into the errors for invalid records.
Test coverage is 97.31%. Nice! |
I noticed several flash.now[:error] conditional checks throughout your views. You can dry up your code by including it in your application layout. |
Nice Test coverage! Nice work! Congrats on being done with bEtsy! |
<div class="row"> | ||
<div class="col-sm-9"> | ||
<div class="btn-group" data-toggle="buttons"> | ||
<% 1.upto(5) do |i| %> |
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.
Hadn't seen upto
used -- neat!
Project complete. Heroku link provided in the ReadMe file.
A couple little bugs but mostly functional.