• Files changed: app/controllers/pages_controller.rb, app/models/party.rb, app/views/pages/home.html.erb, db/migrate/20250823145902_create_parties.rb, db/schema.rb, db/seeds.rb • Nature of changes: Added image support to parties, updated homepage to dynamically display parties, enhanced seed data with parties and ticket types, schema updates for foreign keys • Purpose: Enable dynamic event display on homepage with real data instead of static placeholders, add image support for parties, improve database relationships • Impact: Homepage now shows real party data from database, parties can have images, database schema improved with proper foreign keys • Commit message: feat: implement dynamic event display with party images and seed data
19 lines
567 B
Ruby
19 lines
567 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
|
|
end
|