Brenda and Brandy - Rideshare - Octos#17
Open
brandyaustinseattle wants to merge 75 commits into
Open
Conversation
… html for drivers.
| total += trip.cost | ||
| end | ||
|
|
||
| return "$#{(total/100).round(2)}" |
There was a problem hiding this comment.
I might argue against returning the formatting string here. The value is what is important for this model method, and formatting that should probably be the responsibility of the view
| counter = 0 | ||
| trips.each do |trip| | ||
| if trip.rating.nil? | ||
| trip.rating = 0 |
There was a problem hiding this comment.
What does this do for you? Would this be saved or used later anywhere?
| @@ -0,0 +1,11 @@ | |||
|
|
|||
| <link href="https://fonts.googleapis.com/css?family=Poor+Story" rel="stylesheet"> | |||
There was a problem hiding this comment.
This is more appropriate in the application.html.erb file than in a specific view file
| <%= link_to "Request Trip", passenger_trips_path(@passenger.id), method: :post, data: {confirm: "Do you really want to request a trip for #{@passenger.name}?"} %> | ||
| </div> | ||
|
|
||
| <table class="passengers_show"> |
There was a problem hiding this comment.
This is a nitpick, but for CSS class names, we use the - rather than the _ to separate words, so this would be passengers-show instead.
| def destroy | ||
| Passenger.destroy(params[:id]) | ||
|
|
||
| redirect_back(fallback_location: passengers_path) |
Rideshare-RailsWhat We're Looking For
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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