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

Div-Hannah Rideshare #11

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

Div-Hannah Rideshare #11

wants to merge 74 commits into from

Conversation

Naltrexone
Copy link

@Naltrexone Naltrexone commented Oct 5, 2018

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 The Driver class had many Trips and the Passenger class had mad Trips. Each Trip belongs to a Driver and a Passenger. Each Driver had a Passenger through Trips and each Passenger had a Driver through Trips.
Describe the role of model validations in your application We used model validations to make sure that each of the textfields had to be present. We wrote these validations initially in the model and printed errors in the form page of drivers, passenger, and trips.
How did your team break up the work to be done? Divya - worked on Passenger related requirements.- worked on Adding Trips and selecting rating.- worked on parts of setting up Trips- CSS for Passenger and Trip forms. Hannah - worked on Driver related requirements.- worked on setting up Trip - Styled homepage, index, show pages, and driver form.
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 created working backend of the website first - got methods working etc, before we decided to work on front end details. We didn't set aside anything in particular to meet the deadline.
What was one thing that your team collectively gained more clarity on after completing this assignment? We gained more clarity on the general workings and flow of backend within ruby on rails and how to deploy to heroku.
What is your Trello board URL? https://trello.com/b/xF2gNYvE/div-hannah-rideshare
What is the Heroku URL of your deployed application? https://hannah-div-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? (1)Since we had divided up the work, we ended not working on many things together. In future, we would probably set aside specific tasks to work on together. (2)Both of us found the project to be not as stressful and the fluidity in which we achieved the project went well.

hertweckhr1 and others added 30 commits October 1, 2018 16:14
@CheezItMan
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 Good commit messages and good number of commits, both partners contributed.
Answered comprehension questions Check, the passenger had mad trips. Hmm... must have been using Uber.
Uses named routes (like _path) Check
RESTful routes utilized Yes with a couple of issues, check my notes.
Project Requirements
Table relationships Check
Validation rules for Models You have validations, see my suggestions for more.
Business logic is in the models Check
Database is seeded from the CSV files Check
Trello board is created and utilized in project management Check
Heroku instance is online Check
The app is styled to create an attractive user interface The site looks good, except for one broken image (home button)
Overall Overall well done. Your requesting a trip is a bit awkward and done with a form, which it doesn't need to be. It also allows the user to edit their ID number, which can be problematic. Read my inline notes and let me know any questions you have. Overall however you hit all the major learning goals. Well done.


def destroy
driver = Driver.find_by(id: params[:id].to_i)
driver.destroy

Choose a reason for hiding this comment

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

This won't work if the driver has any trips!


def destroy
passenger = Passenger.find_by(id: params[:id].to_i)
passenger.destroy

Choose a reason for hiding this comment

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

This won't work if the passenger has any trips.

return (total.to_f / self.trips.length).round(2)
end

def self.search(term, page)

Choose a reason for hiding this comment

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

Search! Neat!

However it doesn't look like you have it hooked into the webpage


resources :passengers

resources :passengers do

Choose a reason for hiding this comment

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

You don't need resources :passengers in here twice.

resources :passengers

resources :passengers do
resources :trips, only: [:index, :new, :create]

Choose a reason for hiding this comment

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

Do you need an :index action for trips in this context?

validates :passenger_id, presence: true
validates :driver_id, presence: true
validates :date, presence: true
validates :cost, presence: true

Choose a reason for hiding this comment

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

You should also require that cost be numeric and positive.

validates :driver_id, presence: true
validates :date, presence: true
validates :cost, presence: true

Choose a reason for hiding this comment

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

Rating should also have a validation. It should be 1-5.

belongs_to :driver
belongs_to :passenger
#can you write these all in one line instead of individually?
validates :passenger_id, presence: true

Choose a reason for hiding this comment

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

If the trip belongs to driver, this validation is unnecessary.

return trips_total
end

def self.search(term, page)

Choose a reason for hiding this comment

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

Search! Neat! It doesn't look like it's integrated into the view/controller.

</div>
</div>
<article class="home-button">
<%= link_to image_tag("https://www.iconsdb.com/icons/preview/white/home-xxl.png", alt: "home buttom"), root_path %>

Choose a reason for hiding this comment

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

Seems broken when I ran it.

@Naltrexone
Copy link
Author

Naltrexone commented Oct 8, 2018 via email

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