-
Notifications
You must be signed in to change notification settings - Fork 11
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
FarMarRails #21
base: arhcas/master
Are you sure you want to change the base?
FarMarRails #21
Conversation
…for vendor class. Seed database
…to take in vendor_id params. Worksgit add .
…e individual vendor page
… an iterator that uses i
…sales data from vendor page
…for @if_market, @if_vendor, and @if_guest
id = params[:id] | ||
@market = Market.find(id) | ||
@market = Market.find(params[:id]) | ||
@is_market = true if session[:user_type] == "market" |
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.
By using the one-line conditionals here with the if
s, your code will attempt execution on each individual conditional. The problem with this is that each conditional is actually mutually exclusive, so if the first one is true, it should not continue attempting to execute the rest of the conditionals.
I think that an if/elsif/else condition would be better suited here.
Nice job on this! I like the way your final product turned out. Watch out for using the one-line conditionals if an if/elsif/else is more appropriate. It seemed like sometimes there was too much logic within the views and extra logic that wasn't being used (or I couldn't figure out where) in the controller. Potentially some additional separation of concerns would be in order here. @lacuchilla @CShekta |
FarMarRails project for Amy Hunter and Claire Schechter. URL is https://farmersmarketdata.herokuapp.com/