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:
@@ -2,6 +2,7 @@ class CreateParties < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :parties do |t|
|
||||
t.string :name, null: false
|
||||
t.string :slug, null: false
|
||||
t.string :image, null: true
|
||||
t.text :description, null: false
|
||||
t.integer :state, default: 0, null: false
|
||||
|
||||
Reference in New Issue
Block a user