Skip to content

Pipes - Irene and Sairagul - RideShare#18

Open
sairagula wants to merge 84 commits into
Ada-C8:masterfrom
sairagula:master
Open

Pipes - Irene and Sairagul - RideShare#18
sairagula wants to merge 84 commits into
Ada-C8:masterfrom
sairagula:master

Conversation

@sairagula

@sairagula sairagula commented Oct 6, 2017

Copy link
Copy Markdown

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 Passenger and Driver has many trips. Trips has one Driver and one Passenger. We set it up this way because we wanted Trips to act as a joined table that has information about both Passengers and Drivers and that they can interact through the Trips table.
Describe the role of model validations in your application The role of model validations in our application is to be able to receive a specific input that we are looking for and filter out other inputs that our program does not need. For instance, we created a date validation so that the user does not input a date before the current date.
How did your team break up the work to be done? We broke up the work based on pages. We agreed not to work on the same line on the same page if we work on this at home so that we could avoid merge conflicts as much as possible.
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 such as setting up relationships between the models, being able to add more data such as Passenger, Driver, and Trip, and to be able to edit and update these models. Other features that we set aside was to make the UI more user friendly, but had no time. Also we didn't have time to randomize the cost of the trip.
What was one thing that your team collectively gained more clarity on after completing this assignment? How to resolve merge conflicts, how html.erbs work when calling different models, using custom methods inside the models and calling on them from the view. Also debugging when we deploy to Heroku is HARD but is able to be fixed if you look over your code a bunch of times. :)
What is your Trello URL? https://trello.com/b/sM69H58K/kanban-rideshare
What is the Heroku URL of your deployed application? https://journey-rideshare.herokuapp.com/

sairagula and others added 28 commits October 5, 2017 14:11
Comment thread app/models/driver.rb
if counter > 0
return (result/counter)
else
return "no rating"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is fine to return a string here - but is there a way you could normalize the returned data type and provide a numeric result that would represent "no rating"?

Comment thread app/models/driver.rb
end

def average_rating
ratings = Trip.where(driver_id: 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.

When this method is called, you have access to a specific driver instance. Any Driver instance should already have a "dot method" which will give you access to the trips for that driver. You should be using this functionality instead of reaching out from the Trip object.

<section>
<%= render partial: "error" %>
<%# See _error.html.erb under drivers views for partial %>
<%= render partial: "form", locals: { button_text: "Make Driver Changes" } %>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice job using partials for the form and errors

<%= form_for @trip do |f| %>
<div class="form-box-wrapper">
<%= f.label :rating %>
<%= f.select(:rating, options_for_select([['1 star', 1], ['2 stars', 2], ['3 stars', 3], ['4 stars', 4], ['5 stars', 5]])) %>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It would be good to have this ratings array in the model or in the controller rather than in view.

@kariabancroft

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 Looks good
Answered comprehension questions Yes - glad you got practice with merge conflicts and deploying to Heroku
Uses named routes (like _path) Yes
RESTful routes utilized Yes - routes look good. No duplicates.
Rideshare Rails Specific Content
Table relationships Schema file and model relationships look good.
Validation rules for Models Yes - Nice job using presence validations with formats. Good job creating and using a custom validation.
Business logic is in the models Yes - contains logic for totals and averages.
Database is seeded from the CSV files Yes
Trello board is created and utilized in project management Yes - can you make it public so I can review?
Postgres database is used Yes
Heroku instance is online Yes
The app is styled to create an attractive user interface Yes - looks nice and I like the name of your app. I appreciate that it is easy to navigate and flow. Nice job using the names of the driver/passenger in the links. I like the way the trips are sorted by the date in the view of the trips.
Overall Nice job hitting the major learning goals of this assignment!

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