diff --git a/app/controllers/tickets_controller.rb b/app/controllers/tickets_controller.rb index a5a2234..d8be0b2 100644 --- a/app/controllers/tickets_controller.rb +++ b/app/controllers/tickets_controller.rb @@ -58,7 +58,10 @@ class TicketsController < ApplicationController redirect_to dashboard_path, alert: "Billet non trouvé" return end + @event = @ticket.event + @order = @ticket.order + rescue ActiveRecord::RecordNotFound redirect_to dashboard_path, alert: "Billet non trouvé" end diff --git a/app/views/tickets/show.html.erb b/app/views/tickets/show.html.erb index 0181f79..fb8d02c 100644 --- a/app/views/tickets/show.html.erb +++ b/app/views/tickets/show.html.erb @@ -27,7 +27,7 @@
ID: #<%= @ticket.id %>