Skip to content

Initial rails new app#7

Open
SRBusiness wants to merge 61 commits into
Ada-C8:masterfrom
SRBusiness:master
Open

Initial rails new app#7
SRBusiness wants to merge 61 commits into
Ada-C8:masterfrom
SRBusiness:master

Conversation

@SRBusiness

@SRBusiness SRBusiness 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 We have three entities: drivers, passengers, trips. Drivers and riders have no direct relationship but are connected via trips. Drivers may have zero or many trips, trips one and only one driver. Riders have zero or many trips, while trips have one and only one rider.
Describe the role of model validations in your application We did two types of validation, strong params for every controller. Additionally in the models we validated the presence, numerically, and nil validity for a number of values.
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? In the beginning we prioritized functionality and then worked on the aesthetics once we had the app functioning. We didn't really have to sacrifice any features to complete the project in the timeline.
What was one thing that your team collectively gained more clarity on after completing this assignment? Broadly routes, more specifically we have a much stronger understanding of resources and nested routes. In building this app we have a much better conceptual grasp of how the different parts of rails work together.
How did your team break up the work to be done? We decided to do the main implementation of the models and data seeding together. We used the navigator driver model of pair programming often. When we got further along in the program we split up individual tasks and took advantage of branching.
What is the Heroku URL of your deployed application? srbeek-rideshare.herokuapp.com
What is your Trello URL? https://trello.com/b/d1lEfDkW/ride-share

SRBusiness and others added 30 commits October 2, 2017 15:16
Terminal told me to pull so I'm following instructions and merging. -srb
@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 Yes looks good
Answered comprehension questions Yes
Uses named routes (like _path) Yes
RESTful routes utilized Yes - nice job using only to ensure you were not creating duplicate routes.
Rideshare Rails Specific Content
Table relationships Schema and model relationships look good
Validation rules for Models Yes - nice job using presence and numericality validations
Business logic is in the models Yes - totals, monetary conversions
Database is seeded from the CSV files Yes? Probably?
Trello board is created and utilized in project management Yes - nice job on this
Postgres database is used Yes
Heroku instance is online Yes! You even have a favicon!
The app is styled to create an attractive user interface Yes - you did a really awesome job with the final design. You have created a nice user experience that is easy to navigate and find the information desired.
Overall You did a really nice job hitting the major learning goals on this assignment. You covered a lot of ground via routes, model methods, view helpers and pagination. Nice job.

@@ -0,0 +1,36 @@
<span class="stars">
<% case model

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I love the way you used a partial for this. You could utilize a loop that would generate the stars for the number specified and that would really simplify this view.

@@ -0,0 +1,21 @@
<%= form_for @passenger, html: {id: "passenger-form"} do |f| %>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes - nice job using a partial for this form.

class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true

def total_money

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The only issue with this method here is that it will also apply to the Trip model which probably won't work or be useful.

Comment thread app/models/driver.rb

def average_rating
if trips.any? == false
return "Nil"

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 better to return either nil itself or a string describing the type of issue rather than the string of "Nil" which is not meaningful to your users

Comment thread app/models/driver.rb
length = trips.length
total = 0

trips.each do |trip|

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 could also use an enumerable method to pluck out the ratings values that were populated and create an average that way

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