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

Tor Shimizu - Wini Irarrazaval - Octos - Rideshare Rails #26

Open
wants to merge 62 commits into
base: master
Choose a base branch
from

Conversation

winirarrazaval
Copy link

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 A driver has many trips, a passenger has many trips, a trip belongs to one passenger and one driver.
Describe the role of model validations in your application We had validations to ensure that a person entered a name and vin if a driver, and a phone number if passenger. We also had a validation for trip ratings being between 1..5.
How did your team break up the work to be done? We worked on complicated features together, and for easier things (calculating costs and average rating) we split up by passenger and driver. Tor did mostly CSS and Wini did the heavy logic of finding a driver who has not worked in the least amount of time.
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 included all basic requirements and at first chose a random driver for a trip until we had more requirements done, then went back and chose the driver who has not worked in the longest. We also left the layout for last.
What was one thing that your team collectively gained more clarity on after completing this assignment? We gained more clarity on the MVC structure and are more comfortable with routes and the controller directing to the model or view.
What is your Trello URL? https://trello.com/b/Tu0XuJto/ride-share
What is the Heroku URL of your deployed application? https://mr-octopus-rideshare.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? Wini - I like how Tor had the patience to teach me when I didn't understand and pushed me to do stuff that even though Tor knew how to do, made me do the thing to learn how to do it instead.
Tor - I liked how Wini would be excited to try new things and would be willing to do the new things. I really appreciated that Wini would have good ideas that she would mention aloud and make us try. I appreciated that if I had ideas, she was willing to try it.
We both could trust that the other could get separate things done at home.

winirarrazaval and others added 30 commits April 2, 2018 15:22
… in the edit.html.erb and new.html.erb views. We are able to update and add drivers
…ngs methods. Then I added them to the driver/show
… cases and updated driver#destroy to replace the driver in its trips with a placeholder driver before destroying the selected driver
torshimizu and others added 28 commits April 5, 2018 14:26
…uming that if there is a trip with no rating is still in trip
…able driver, added some styling to driver page
…er show page, will display a form to get rating
@droberts-sea
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 yes
Answered comprehension questions yes
Uses named routes (like _path) yes
RESTful routes utilized yes - some extra, see inline
Rideshare Rails Specific Content
Table relationships yes
Validation rules for Models yes
Business logic is in the models yes - see inline comments
Database is seeded from the CSV files yes
Trello board is created and utilized in project management yes
Postgres database is used yes
Heroku instance is online yes
The app is styled to create an attractive user interface yes - good work
Overall Great job overall! I've left some nitpicks below, but in general I am quite pleased with this submission. Keep up the hard work!

end

resources :trips, except: [:destroy]
resources :rideshare, only: [:index]

Choose a reason for hiding this comment

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

I like that you're excluding the destroy route on trips, but I think you could go even further. It doesn't look like new or the un-nested create routes are being used.

def self.the_driver
drivers = Driver.where(disabled: false)
longest_driver_not_driving = drivers.first
drivers.each do |driver|

Choose a reason for hiding this comment

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

I'm not sure about the name of this method - if I hadn't seen this file and I saw a call to Driver.the_driver, I would not know what that method is doing. Something like select_driver might be more mnemonic.


def driver_on_trip
self.trips.each do |trip|
return true if trip.rating == nil

Choose a reason for hiding this comment

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

In general, you don't need to include the name of the class in an instance method for that class. Also, since this method returns true or false, the Ruby convention is to end the name in a question mark. So this one should be on_trip?.

<% if model = @passenger %>
<%= f.label :phone_num, class: 'label' %>
<%= f.text_field :phone_num, class: 'control input' %>
<%= f.submit action_name, class: 'control button is-link' %>

Choose a reason for hiding this comment

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

While I appreciate the enthusiasm, the fact that you've got a big if statement here indicates you may have gone too far trying to DRY this up. I would probably have made the errors and hero section their own partial, and written a separate form_for for driver and passenger.

<h4> Trips: </h4>
<ul class='display-trips'>
<li>ID</li>
<li>Date</li>

Choose a reason for hiding this comment

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

Good work breaking this out as a separate view partial!

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