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

Daniela and Jackie F. - Spooky Bus #5

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

Conversation

mystioreo
Copy link

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 Drivers have many trips and Passengers have many trips. Trips have one Driver and one Passenger.
Describe the role of model validations in your application We validated that certain fields were present in each model in order to create a new record. For example, it would make no sense to have a passenger without a name, so we ensure that this doesn't happen. Validations were used to ensure that only valid data was entered into our database. For example, the cost of a trip has to be an integer to ensure that we can perform calculations on them. The rating has to be between 1 and 5 (we also do math using the rating). These are both cases where invalid data in our database would break our program, therefore we needed validation in our models.
How did your team break up the work to be done? We started working together, creating the models and setting up our database. Then we split the work into Driver and Passenger model tasks. Then we came back together and worked on Trips, validation, and styling.
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 tried to do everything listed on the assignment page, using guidance from the wireframes. We had trouble implementing the edit feature for trips when it came to the cost and date fields so we opted to leave this functionality off the form entirely. We also did not prioritize css styling.
What was one thing that your team collectively gained more clarity on after completing this assignment? We gained more clarity on how routes work and how you might create a nested or custom route. We also gained clarity on how multiple models work together and the way that you build methods in the model to pass information to the controller or the view.
What is your Trello board URL? https://trello.com/b/UtEPhDVK/daniela-jackie-rideshare
What is the Heroku URL of your deployed application? https://spooky-bus.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? We have very similar work styles and programming styles, which was great most of the time, but we both dislike CSS and styling in general. Neither of us are huge planners, but we both like to work quickly and get things done. This made for a low stress project, but maybe if we had different work styles the final project might have been stronger.

mystioreo and others added 30 commits October 1, 2018 15:19
@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 number of commits and good commit messages, both partners contributed.
Answered comprehension questions Check, glad it was a low-stress project for you two. You made the right call to deprioritize styling here.
Uses named routes (like _path) Check
RESTful routes utilized Check
Project Requirements
Table relationships Check
Validation rules for Models Check
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 I love the halloween styling.
Overall Great work, you hit all the learning goals. See my inline notes and let me know if you have any questions.

@@ -0,0 +1,19 @@
class Passenger < ApplicationRecord
validates :name, presence: true, format: { with:/\A\S+\s{1}.+\z/ , message: "Please enter a first and last name."}

Choose a reason for hiding this comment

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

Nice work with a regex.

@@ -0,0 +1,19 @@
class Passenger < ApplicationRecord
validates :name, presence: true, format: { with:/\A\S+\s{1}.+\z/ , message: "Please enter a first and last name."}
validates :phone_num, presence: true, format: { with: /\A1?\W?\d{3}.\d{3}.\d{4}.?x?\d*\z/, message: "Please enter a valid phone number in (XXX)XXX-XXXX format."}

Choose a reason for hiding this comment

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

👍


def total_charges
sum = 0
self.trips.each do |trip|

Choose a reason for hiding this comment

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

You could also use reduce or another enumerable method.

class Driver < ApplicationRecord
validates_presence_of :vin
validates :name, presence: true, format: { with:/\A\S+\s{1}.+\z/ , message: "Please enter a first and last name."}

Choose a reason for hiding this comment

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

Good set fo validations and business logic methods, consider using enumerables next project.

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