Skip to content

Carets -- Stef & Guille: made rails app#4

Open
murog wants to merge 35 commits into
Ada-C8:masterfrom
murog:master
Open

Carets -- Stef & Guille: made rails app#4
murog wants to merge 35 commits into
Ada-C8:masterfrom
murog:master

Conversation

@murog

@murog murog commented Oct 2, 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 Passengers and Drivers have many trips, but trips only belong to a single passenger and a single driver.
Describe the role of model validations in your application In order for a trip to be created, it checks whether the passenger is currently on a trip. This is supposed to align with the fact that you can't call another uber until your current trip is completed.
How did your team break up the work to be done? We paired for the initial set up and delegated tasks on the trello board to work on independently.
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 set aside CSS styling in order to meet the deadline. Instead, we prioritized proper validations and business logic in the app. However, we did not have time to incorporate nested routes, which would have made the process of creating a trip for a passenger much cleaner. Currently, it relies on local variables being sent through the params, which is not secure.
What was one thing that your team collectively gained more clarity on after completing this assignment? VALIDATIONS! The trip class uses a custom method that validates only on creation.
What is your Trello URL? https://trello.com/b/Ctpu6iBV/ride-share-rails
What is the Heroku URL of your deployed application? http://do-cats.herokuapp.com/

@murog murog changed the title made rails app Carets -- Stef & Guille: made rails app Oct 2, 2017
murog and others added 28 commits October 2, 2017 16:39
@tildeee

tildeee commented Oct 14, 2017

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
Answered comprehension questions x
Uses named routes (like _path) x
RESTful routes utilized x
Rideshare Rails Specific Content
Table relationships x
Validation rules for Models i like the specific validations on trip, but no validations for presence of fields on driver and passenger
Business logic is in the models x
Database is seeded from the CSV files x
Trello board is created and utilized in project management the format is a little confusing-- were the cards moved into done and doing?
Postgres database is used x
Heroku instance is online x
The app is styled to create an attractive user interface missing stylesheets
Overall

@tildeee

tildeee commented Oct 15, 2017

Copy link
Copy Markdown
  • stylesheets are referenced to load from the path /resources/demos/style.css and it doesn't exist
  • the UI is a little confusing, on the home page the cat is draggable but on other pages it is VERY hard to find the corner to drag the cat away
  • the passenger's show page still has all of the default text, such as the header "Passenger#show" and "Find me in app/views/passengers/show.html.erb" on it
  • the trip's show page still has all of the default text, with BOTH headers "Passengers#show" and "Trips#show," and "Find me in app/views/trips/show.html.erb"
  • loading a driver's show page when it has a trip with no rating assigned to it makes it nil, and breaks the site at the driver show page (side effect of no validations on Trip or error handling when doing Driver#average_rating
  • Optional, but would have made the user experience better
    • No links to edit or delete a specific Passenger or Driver on its own show page,
    • No links to view individual trips associated with a Driver in a Driver's show page, or links to the passenger associated with that trip
  • pretty disappointed that there are no validations
  • If a driver has no trips associated with it, on the driver show page, it says that the average rating is "NaN out of 5." see comment

Comment thread app/models/driver.rb
trips.each do |trip|
total += trip.rating
end
return "#{(total / trip_count).round(2)}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What happens if there are no trips associated with a driver? Then total would be 0.0 and trip_count is 0. Ruby evaluates 0.0 / 0 as NaN or "Not A Number." When it gets to the driver/show.html.erb view, NaN.to_s evaluates to just "NaN" so it shows up on the driver page as "NaN" on the page. It'll show up like this:
"Minnie Dach

Average rating is NaN out of 5."

</ul>
<% end %>
<% end %>
<% else %>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please practice proper indentation in your view files

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