Skip to content

Commit

Permalink
commented out reviews form in bookings show page
Browse files Browse the repository at this point in the history
  • Loading branch information
Che To committed May 22, 2019
1 parent 526d25c commit dce12e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions app/views/bookings/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@
</div>

<%#= link_to "Add a review", new_vehicle_review_path(@booking.vehicle), class: "btn btn-primary" %>
<h1>All reviews</h1>
<% @reviews.each do |review| %>
<p><%= review.comment %></p>
<% end %>
<%= simple_form_for([@booking, @review]) do |f| %>
<%= f.input :rating %>
<%= f.input :comment %>
<%= f.submit "Add a review" %>
<% end %>
<!-- <h1>All reviews</h1>
<%# @reviews.each do |review| %>
<p><%#= review.comment %></p>
<%# end %>
<%#= simple_form_for([@booking, @review]) do |f| %>
<%#= f.input :rating %>
<%#= f.input :comment %>
<%#= f.submit "Add a review" %>
<%# end %>
<% if policy(@booking).edit? %>
<%= link_to "Edit Booking", edit_vehicle_booking_path(@booking.vehicle, @booking), class: "btn btn-primary" %>
<%= link_to "Delete Booking", booking_path(@booking), method: :delete, class: "btn btn-success" %>
<% end %>
<%# if policy(@booking).edit? %>
<%#= link_to "Edit Booking", edit_vehicle_booking_path(@booking.vehicle, @booking), class: "btn btn-primary" %>
<%#= link_to "Delete Booking", booking_path(@booking), method: :delete, class: "btn btn-success" %>
<%# end %>
</div>
-->
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dce12e5

Please sign in to comment.