Skip to content

Conversation

@jazziesf
Copy link

@jazziesf jazziesf commented Oct 5, 2018

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 We had 3 relationships. Trips, Passengers, and Driver. Driver and Passenger were a many to many relationship. A Driver can have many Passengers and vice versa through trips.
Describe the role of model validations in your application To prevent the user from inputing invalid data.
How did your team break up the work to be done? We broke up tasks in styling and coding. Worked with each other a lot in the beginning and touch base daily on our application.
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 focused on the primary requirements. I think our paths could have been routed differently. Formatting of Trips could have been improved in functionality.
What was one thing that your team collectively gained more clarity on after completing this assignment? How to use the methods and iterations through instance variables.
What is your Trello board URL? https://trello.com/b/MmVOUtyV/jazz-shelanrideshare
What is the Heroku URL of your deployed application? https://ride-shareada.herokuapp.com/
What are two discussion points that you and your pair discussed when giving/receiving feedback from each other that you would be willing to share?

@CheezItMan
Copy link

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 good commit messages. Both partners contributed.
Answered comprehension questions Check, but you didn't seem to discuss anything...
Uses named routes (like _path) Check
RESTful routes utilized Check
Project Requirements
Table relationships Check
Validation rules for Models Check, however see my inline notes
Business logic is in the models Check
Database is seeded from the CSV files Check
Trello board is created and utilized in project management Check
Heroku instance is online Check
The app is styled to create an attractive user interface Simple but effective styling
Overall Nice work, you hit all the learning goals for the project. Do see my notes in the code about your bug with drivers and incomplete trips.

class Trip < ApplicationRecord
belongs_to :passenger
belongs_to :driver

Choose a reason for hiding this comment

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

No validations on rating or cost?

total = 0
trips.each do |trip|

total += (trip.cost - 1.65)

Choose a reason for hiding this comment

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

indentation!

total += (trip.cost - 1.65)
end
total_revenue = (total * 0.80)
total_revenue *= 0.01

Choose a reason for hiding this comment

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

total revenue becomes 1% of the total revenue?


def average_rating
total = 0
self.trips.each do |trip|

Choose a reason for hiding this comment

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

This method is counting incomplete trips in the sum. You need to have some way to filter out incomplete trips.

enum status: %i[inactive active]

validates :name, presence: true
validates :vin, presence: true

Choose a reason for hiding this comment

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

You should also validate the length.

has_many :passengers, through: :trips
has_many :trips, dependent: :nullify

enum status: %i[inactive active]

Choose a reason for hiding this comment

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

👍

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