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:
@@ -1,4 +1,4 @@
|
||||
class EventsController < ApplicationController
|
||||
class PartiesController < ApplicationController
|
||||
# Display all events
|
||||
def index
|
||||
@parties = Party.includes(:user).upcoming.page(params[:page]).per(12)
|
||||
@@ -6,5 +6,6 @@ class EventsController < ApplicationController
|
||||
|
||||
# Display desired event
|
||||
def show
|
||||
@party = Party.find(params[:id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user