Skip to content

Ampers Victoria/Mary#9

Open
mmlamkin wants to merge 47 commits into
Ada-C9:masterfrom
mmlamkin:master
Open

Ampers Victoria/Mary#9
mmlamkin wants to merge 47 commits into
Ada-C9:masterfrom
mmlamkin:master

Conversation

@mmlamkin

@mmlamkin mmlamkin commented Apr 3, 2018

Copy link
Copy Markdown

Add due date

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 related drivers and passengers through trips ie passengers had many trips and drivers had many trips.
Describe the role of model validations in your application The validations ensure that drivers and passengers have all of the necessary attributes before being created. ie a driver needs a name and vin and a passenger needs name and phone number, without these things they cannot be saved.
How did your team break up the work to be done? We pair programmed during school time and divided up trello tasks by night
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 wanted to make sure we got to all of the required elements as well as have some decent styling. Our first feature we wanted to do was trip creation and the last thing we did was updating a nil trip rating for a created trip. We did not get to the "available" drivers task, unfortunately
What was one thing that your team collectively gained more clarity on after completing this assignment? RADIO BUTTONS!
What is your Trello URL? https://trello.com/b/3bp89jhB/rails-rideshare
What is the Heroku URL of your deployed application? https://mary-vic-rideshare.herokuapp.com/trips

mmlamkin and others added 30 commits April 2, 2018 15:55
…passenger New and Edit done. Methods for Passenger and Driver controller edit and update methods done. Database reset.
…model. No testing done, though: Not at all sure if any of this works.
…e to make it visible. No styling of it, yet, though.
Made features for driver on a separate branch. Now merging these in.
…d the relevant routes, plus fixed the resulting math-on-nil and division-by-zero issues in the driver and passenger business logic.
…engers and trips controllers, the trips models, and the routes.
@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 Check, it looks like you mostly worked on one computer, which is fine.
Answered comprehension questions Check, RADIO BUTTON* :p
Uses named routes (like _path) Check
RESTful routes utilized Check, but I do notice you have a create route available to create a new trip, as well as a new_trip route, which you aren't using.
Rideshare Rails Specific Content
Table relationships Check
Validation rules for Models Some validations used, more is needed in the Trip model.
Business logic is in the models You did the overall earnings, total spent and average rating in the model. I would also suggest creating a model method to assign the next available driver. That sounds like business logic to me. I also notice that all new trips are free and every driver is always available, no way to take a break in your app, but that wasn't a project requirement.
Database is seeded from the CSV files Check, nice work.
Trello board is created and utilized in project management Check, well done
Postgres database is used Check
Heroku instance is online Check
The app is styled to create an attractive user interface Very nice work here! Simple, but effective
Overall Not bad, you have issues, but you hit the major learning goals. I like the simple and effective styling. Next time however do check your routes and eliminate unused routes.

<% @drivers.each do |driver| %>

<li>
<img src="http://placecage.com/g/100/100" alt="photo"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just a small note, it's human nature to want to click on a user's picture, so making the picture a link as well, would be good.

Comment thread app/models/trip.rb
belongs_to :passenger

validates :driver_id, presence: true
validates :passenger_id, 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 also validate the cost being >= 0 and the rating being 1 - 5.

def create
@trip = Trip.new
@trip.passenger_id = params[:passenger_id]
@trip.driver_id = Driver.all.sample.id

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are you assuming all drivers are always available?

I also notice all new trips are free (i.e. the cost is $0.0). How generous of you both!

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