Skip to content

Commit

Permalink
Patch booking instead of destroy it on cancel from company views
Browse files Browse the repository at this point in the history
  • Loading branch information
martent committed Jul 16, 2018
1 parent 27dce4f commit 622dcd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/companies/_bookings.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
%tr
%td= link_to booking.place.name, place_path(booking.place)
%td= date_and_time(booking)
%td.delete= link_to 'Avboka', booking_path(booking, from_company_view: true),
method: :delete, data: { confirm: 'Är du säker på att du vill avboka?' }, class: "btn btn-danger btn-sm"
%td.delete= button_to 'Avboka', cancel_booking_path(booking, from_company_view: true),
method: :patch, data: { confirm: 'Är du säker på att du vill avboka?' }, class: "btn btn-danger btn-sm"

0 comments on commit 622dcd5

Please sign in to comment.