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

FarMarRails #21

Open
wants to merge 48 commits into
base: arhcas/master
Choose a base branch
from
Open

Conversation

lacuchilla
Copy link

FarMarRails project for Amy Hunter and Claire Schechter. URL is https://farmersmarketdata.herokuapp.com/

lacuchilla and others added 30 commits November 18, 2015 10:05
id = params[:id]
@market = Market.find(id)
@market = Market.find(params[:id])
@is_market = true if session[:user_type] == "market"

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 ifs, 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.

@kariabancroft
Copy link

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

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.

3 participants