-
Notifications
You must be signed in to change notification settings - Fork 24
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
Brenda and Brandy - Rideshare - Octos #17
base: master
Are you sure you want to change the base?
Conversation
… html for drivers.
total += trip.cost | ||
end | ||
|
||
return "$#{(total/100).round(2)}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Rideshare-RailsWhat We're Looking For
|
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