Files
aperonight/app/controllers/pages_controller.rb
2025-08-25 20:17:44 +02:00

24 lines
725 B
Ruby

# Controller for static pages and user dashboard
# Handles basic page rendering and user-specific content
class PagesController < ApplicationController
# Skip authentication for public pages
# skip_before_action :authenticate_user!, only: [ :home ]
# Homepage showing featured parties
def home
# @parties = Party.published.featured.limit(3)
@parties = Party.where(state: :published).order(created_at: :desc)
puts @parties
end
# User dashboard showing personalized content
# Accessible only to authenticated users
def dashboard
end
# Events page showing all published parties with pagination
def events
@parties = Party.published.order(created_at: :desc).page(params[:page])
end
end