Skip to content

Carets- Jan and Julia#24

Open
julmeier wants to merge 65 commits into
Ada-C8:masterfrom
JNEdrozo:master
Open

Carets- Jan and Julia#24
julmeier wants to merge 65 commits into
Ada-C8:masterfrom
JNEdrozo:master

Conversation

@julmeier

@julmeier julmeier commented Oct 7, 2017

Copy link
Copy Markdown

Rideshare-Rails

Congratulations! You're submitting your assignment! These comprehension questions should be answered by both partners together, not by a single teammate.

Comprehension Questions

Question Answer
Describe the types of entity relationships you set up in your project and why you set up the relationships that way Each trip only has one passenger and one driver, according to our model . Both passengers and drivers can have many trips, so we added a reference to our trips table so that the passenger and driver id's were foreign keys. We did this so that the passenger and the driver AR object can access the information from the trips table.
Describe the role of model validations in your application We used model validation to make sure that specific form fields were required in order for the user to create or modify a new driver, passenger or trip.
How did your team break up the work to be done? Since Julia was sick in the beginning of the week, Jan took the reins and partnered with Shaunna and Jocelyn to work together to get the project set up, including developing the trello board, setting up the model, etc. Julia focused on the HTML/CSS at the end of the project.
What features did you choose to prioritize in your project, and what features, if any, did you have to set aside to meet the deadline? We kept the views very primitive while developing and prioritized implementing the routes, generating and developing the controller, seeding the model. Only when all the logic was complete did we start with the styling. We had to put aside fancy styling in order to meet the deadline!
What was one thing that your team collectively gained more clarity on after completing this assignment? We've gotten a better grasp on the use and interaction of the MVC paradigm. But we could use some clarity on the separation of concerns of the logic in the controller and model. We know that, based on homework reading, that if there is a question of where code belongs, it likely belongs in the model- but a discussion would still help.
What is your Trello URL? https://trello.com/b/Ekj4qp5O/rideshare-pairprogramming
What is the Heroku URL of your deployed application? https://arcane-fortress-54184.herokuapp.com

JNEdrozo and others added 30 commits October 2, 2017 13:53
…enable and then enter a command e.g. Driver.all)
…Data button only saves the trip rating- needs to be fixed
…no rating. we modified our driver model to ignore trips without rating data when calculating the average rating
@CheezItMan

Copy link
Copy Markdown

Rideshare-Rails

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with no extraneous files checked in and both partners contributing Good number of commits and both partner contributed.
Answered comprehension questions Check, we'll do more discussion about where methods for business logic go next week I think.
Uses named routes (like _path) check,
RESTful routes utilized Check, except for routes like rating a trip.
Rideshare Rails Specific Content
Table relationships Check
Validation rules for Models You have validations for the presence of fields, but you should have validations to limit ratings to specific values and
Business logic is in the models Great work here putting business logic in the models.
Database is seeded from the CSV files Check
Trello board is created and utilized in project management It doesn't look like you used the Trello board much. Most things are in the to-do category.
Postgres database is used Check
Heroku instance is online Check
The app is styled to create an attractive user interface
Overall I like how if I delete things like a trip it goes back to the passenger page. The stylings look nice and attractive. I like how you had columns used for lists of passengers and drivers. You hit all the requirement in terms of functionality. Note my comment in your code that you have a bug for when a driver has no trips, the show page will generate an error because they have no trips (divide by 0). Other than that good work!

Comment thread app/models/driver.rb
return (total * 0.85)
end

def ave_rating

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This method always does integer division to calculate the average. So you can't have a rating of 2.5.

Also what if they have no trips! This will generate an error!

Comment thread app/models/trip.rb
belongs_to :driver
belongs_to :passenger
validates :date, presence: true
validates :cost, presence: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You should have a validation for rating to limit them between 0 and 5 or 1 and 5.

@julmeier

julmeier commented Oct 8, 2017 via email

Copy link
Copy Markdown
Author

@CheezItMan

CheezItMan commented Oct 8, 2017 via email

Copy link
Copy Markdown

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