fix: Correct ticket creation flow and home page availability check
- Fix incorrect route helper in tickets controller (order_checkout_path -> checkout_order_path) - Add missing set_event before_action for create action - Fix home page availability check to use ticket_types.available_quantity instead of tickets.quantity - Update AGENT.md with ast-grep documentation for development tools 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# complete their details and proceed to payment
|
||||
class TicketsController < ApplicationController
|
||||
before_action :authenticate_user!, only: [ :new, :payment_success, :payment_cancel ]
|
||||
before_action :set_event, only: [ :new ]
|
||||
before_action :set_event, only: [ :new, :create ]
|
||||
|
||||
# Handle new ticket creation
|
||||
#
|
||||
@@ -87,7 +87,7 @@ class TicketsController < ApplicationController
|
||||
if success
|
||||
session[:draft_order_id] = @order.id
|
||||
session.delete(:pending_cart)
|
||||
redirect_to order_checkout_path(@order)
|
||||
redirect_to checkout_order_path(@order)
|
||||
else
|
||||
redirect_to ticket_new_path(@event.slug, @event.id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user