fix: Add slug column to parties table and update seed data

- Added slug column to parties table via migration
- Updated seed data to properly assign slug values to Party records
- Fixed NoMethodError when assigning slug attribute in seed file

This resolves the ActiveModel::UnknownAttributeError that occurred
when trying to set the slug attribute on Party model instances.
This commit is contained in:
Kevin BATAILLE
2025-08-26 02:27:18 +02:00
parent 6385c39c10
commit a0f008bbd4
14 changed files with 364 additions and 80 deletions

View File

@@ -31,6 +31,7 @@ users = User.all.to_a
parties_data = [
{
name: "Summer Beach Party",
slug: "summer-beach-party",
description: "Join us for an amazing night at the beach with music, dancing, and cocktails.",
venue_name: "Sunset Beach Resort",
venue_address: "123 Ocean Drive, Miami, FL",
@@ -44,6 +45,7 @@ parties_data = [
},
{
name: "Rooftop Jazz Night",
slug: "rooftop-jazz-night",
description: "Experience smooth jazz under the stars at our exclusive rooftop venue.",
venue_name: "Skyline Rooftop Bar",
venue_address: "456 Downtown Ave, New York, NY",
@@ -57,6 +59,7 @@ parties_data = [
},
{
name: "Warehouse Electronic Festival",
slug: "warehouse-electronic-festival",
description: "A night of electronic music and dancing in an industrial warehouse setting.",
venue_name: "Downtown Warehouse",
venue_address: "789 Industrial Blvd, Los Angeles, CA",