Files
aperonight/app/controllers/events_controller.rb
kbe bd6c0d5ed8 refactor: Remove legacy checkout methods from EventsController
- Remove checkout, process_names, and download_ticket methods
- Remove process_payment private method with complex Stripe logic
- Remove StripeConcern include and related authentication requirements
- Simplify EventsController to focus only on event display
- All checkout functionality now handled by OrdersController
- Clean up before_actions to match remaining functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:44:00 +02:00

32 lines
710 B
Ruby
Executable File

# Events controller
#
# This controller manages all events. It load events for homepage
# and display for pagination.
class EventsController < ApplicationController
before_action :authenticate_user!, only: [ ]
before_action :set_event, only: [ :show ]
# Display all events
def index
@events = Event.includes(:user).upcoming.page(params[:page]).per(12)
end
# Display desired event
#
# Find requested event and display it to the user
def show
# Event is set by set_event callback
end
private
# Set the current event in the controller
#
# Expose the current @event property to method
def set_event
@event = Event.includes(:ticket_types).find(params[:id])
end
end