Skip to content

Fire - Ayesha & Roshni #29

Open
roshni-patel wants to merge 51 commits intoAda-C14:masterfrom
roshni-patel:master
Open

Fire - Ayesha & Roshni #29
roshni-patel wants to merge 51 commits intoAda-C14:masterfrom
roshni-patel:master

Conversation

@roshni-patel
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 Both passengers and drivers can have many trips. Each trip belongs to one driver and one passenger.
Describe the role of model validations in your application Model validations are important for ensuring that the data is valid. For example, if a user tries to create a driver without entering a valid VIN or name, our program will raise an error and let the user know politely to enter the required information.
How did your team break up the work to be done? We alternated driving and navigating through the implementation of code and tests. Toward the end of the project, we split up tasks but made sure to check in with each other to iron out some of the larger details.
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 functionality, navigation, and user usability. We didn't spend as much time on styling as we wanted to ensure that we understood the primary learning concepts for the project.
What was one thing that your team collectively gained more clarity on after completing this assignment? We gained more clarity on the MVC concept/structure.
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? Ayesha mentioned that she found it helpful to be able to lead the project when she was in the driver's seat and feel the ownership equally while designing and implementing the project. We were both very appreciative that we were respectful of each other's teamwork guidelines and made sure to not to invade the other person's comfort level.
Optional: What is the URL of your deployed Heroku app?

roshni-patel and others added 30 commits November 2, 2020 17:50
Merge branch 'master' of https://github.com/roshni-patel/ride-share-rails into master
Copy link

@CheezItMan CheezItMan 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 ✔️, yes, but you 're missing a test for the numericality of rating.
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 ✔️, although more table-like styling woudl be an improvement. Also and more importantly some of the text is hard to read. Lastly the trips index page is just a list of ids.
The app uses/is compatible with database seeds ✔️
Router code is clean: uses resources and RESTful 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 ✔️, yes but expenses is not displayed as money. Further the list of trips is just a list of id numbers... you should show more information.
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 ⚠️, No validation error messages for the most part.
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 ⚠️, No validation error messages for the most part.
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

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 8+ in Code Review && 5+ in Functional Requirements 👍🏽

Code Style Bonus Awards

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

Quality Yes?
Perfect Indentation
Descriptive/Readable
Logical/Organized

Summary

Overall nice work, y'all hit the learning goals well. I have some criticisms and you can find them inline in the code review. The biggest things revolve around giving the user feedback when they do something not allowed.

validates :name, presence: true
validates :phone_num, presence: true

def net_expenditures

Choose a reason for hiding this comment

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

👍 Nice!

def self.request_trip(passenger)
available_drivers = Driver.where(:available => true)

raise ArgumentError, 'No drivers available' if available_drivers.empty?

Choose a reason for hiding this comment

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

Good use of an argument error.

available_driver.update({available: false})
redirect_to trip_path(@trip.id)
else
redirect_to trips_path

Choose a reason for hiding this comment

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

You should do something to handle if there is a error creating the trip.


# Assert
# Check that the controller redirects
must_respond_with :redirect

Choose a reason for hiding this comment

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

Again I would suggest re-rendering the new passenger form and displaying validation errors.

patch passenger_path(id), params: new_passenger_hash
end.wont_change 'Passenger.count'

must_respond_with :not_found

Choose a reason for hiding this comment

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

👍

patch passenger_path(id), params: new_passenger_hash
end.wont_change 'Passenger.count'

must_redirect_to passenger_path

Choose a reason for hiding this comment

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

Like new I suggest re-rendering :edit and displaying validation errors.

@@ -61,21 +61,33 @@
# Tests for methods you create should go here
describe "custom methods" do

Choose a reason for hiding this comment

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

No validation or relationship tests?

end
end

describe "validations" do

Choose a reason for hiding this comment

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

No tests for ratings?

roshni-patel and others added 6 commits November 12, 2020 20:02
Co-authored-by: Chris M <chris@adadevelopersacademy.org>
Co-authored-by: Chris M <chris@adadevelopersacademy.org>
Co-authored-by: Chris M <chris@adadevelopersacademy.org>
Co-authored-by: Chris M <chris@adadevelopersacademy.org>
Co-authored-by: Chris M <chris@adadevelopersacademy.org>
Co-authored-by: Chris M <chris@adadevelopersacademy.org>
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