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:
@@ -26,7 +26,8 @@ development:
|
||||
# re-generated from your development database when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
database: aperonight_development
|
||||
<<: *default
|
||||
database: aperonight_test
|
||||
# adapter: sqlite3
|
||||
# pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||
# database: data/test.sqlite3
|
||||
|
||||
@@ -12,9 +12,9 @@ Rails.application.routes.draw do
|
||||
# Defines the root path route ("/")
|
||||
root "pages#home"
|
||||
|
||||
# Events page
|
||||
get "events", to: "events#index"
|
||||
get "events/:id", to: "events#show"
|
||||
# parties page
|
||||
get "parties", to: "parties#index", as: "parties"
|
||||
get "parties/:slug.:id", to: "parties#show", as: "party"
|
||||
|
||||
# Routes for devise authentication Gem
|
||||
# Bind devise to user
|
||||
|
||||
Reference in New Issue
Block a user