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

Alice B and Anna #5

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

Alice B and Anna #5

wants to merge 124 commits into from

Conversation

annakim93
Copy link

Assignment Submission: Rideshare Rails

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions. These questions should be answered by all team members together, not by a single teammate.

Reflection

Prompt Response
Describe the types of entity relationships you set up in your project and why you set up the relationships that way Trips belong to Passengers and belongs to Drivers; Passenger has many trips; Driver has many trips; we did it this way because a trip has a passenger and a driver and passengers and drivers can take many trips
Describe the role of model validations in your application Make sure we have the required fields for the drivers, passengers, and to create a trip
How did your team break up the work to be done? We split up passenger and driver and trips and did the tests for each one
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 prioritized having all the logical model methods done and having a good looking site that works!
What was one thing that your team collectively gained more clarity on after completing this assignment? How to use Rails!
What are two discussion points that you and your team discussed when giving/receiving feedback from each other that you would be willing to share? We discussed how we like to work - this was our first time splitting up the work and pulling and pushing to Git; we learned to communicate a lot so that we can do our own parts and still come together and resolve merge conflicts
Optional: What is the URL of your deployed Heroku app?

Alice Boone and others added 30 commits November 2, 2020 19:54
@aliceboone
Copy link

aliceboone commented Nov 7, 2020

Copy link

@beccaelenzil beccaelenzil left a comment

Choose a reason for hiding this comment

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

Rideshare Rails

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
Practices collaborating with git, and all team members contribute git commits and best git practices ✔️
Demonstrates understanding of relationships by giving accurate answers to the reflection questions and appropriate code in the models ✔️
Logic to calculate a driver's average rating and total earnings is located in the model, and it has unit tests ✔️
There are reasonable tests to test the validation requirements for all models ✔️
There are reasonable tests to test the relationship requirements for all models ✔️
There are reasonable tests to test the controller actions for all controllers ✔️
The app has an attractive and usable user interface ✔️ Nice user experience!
The app uses/is compatible with database seeds ✔️
Router code is clean: uses resources and RESTful routes ✔️ Good work limiting routes

Functional Requirements

Functional Requirement yes/no
On the passenger's details page, I want to be able to see total charged, list of trips, a link to edit, and delete ✔️
When adding a new passenger, I want to see errors and validations that show that a passenger must be provided a name and a phone number, so that I cannot make a passenger without name or phone number ✔️
On the passenger's details page, I can create a new trip for this passenger, with an assigned driver and no rating ✔️
On the driver's details page, I want to be able to see total earnings, average rating, list of trips, a link to edit, and delete ✔️
When adding a new driver, I want to see errors and validations that show that a driver must be provided a name and VIN, so that I cannot make a driver without name or VIN ✔️
On the trip's detail page, I want to be able to view details, assign a rating, navigate to the trip's passenger, driver, a link to edit, and delete ✔️

Overall Feedback

Excellent job overall. This code is well-written and well-tested. It is clear that the learning goals around model relationships, validations, and seeding were met. You've created a great user experience with attractive styles. Furthermore, great work using Flash and parital views. Keep up the hard work!

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 8+ in Code Review && 5+ in Functional Requirements ✔️
Yellow (Approaches Standards) 5+ in Code Review && 4+ in Functional Requirements, or the instructor judges that this project needs special attention
Red (Not at Standard) 0-4 in Code Review or 0-3 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging, or the instructor judges that this project needs special attention

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Perfect Indentation
Elegant/Clever
Descriptive/Readable
Concise
Logical/Organized

end
end

def change_driver_status

Choose a reason for hiding this comment

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

Great use of a custom model method. Consider creating this as a Driver class method.

Comment on lines +30 to +35
<div class="row">
<div class="col-25">
<%= f.label :available %>
</div>
<div class="col-75">
<%= f.text_field :available %>

Choose a reason for hiding this comment

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

Consider whether you want the use to be able to enter the status of a driver. It could default to true and could only be changed using your custom action. It is not intuitive what should be entered in this form field.

resources :trips, only: [:index]
end

patch 'drivers/:id/toggle_availability', to: 'drivers#toggle_availability', as: :toggle_availability

Choose a reason for hiding this comment

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

Great use of custom route.

@@ -60,22 +72,40 @@

# Tests for methods you create should go here
describe "custom methods" do
describe "average rating" do
# Your code here
it "average rating: will return nil if there were no trips or ratings recorded" do

Choose a reason for hiding this comment

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

Good work testing this edge case


<section>
<h3><%= @passenger.name %>'s trips</h3>
<%= render partial: "trips" %>

Choose a reason for hiding this comment

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

Nice use of a partial view.

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