1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00

Fix unknown attribute 'parent_category' for Category in demo generator (#1575)

```ruby
❯ bin/rails demo_data:reset
user reset
bin/rails aborted!
ActiveModel::UnknownAttributeError: unknown attribute 'parent_category' for Category. (ActiveModel::UnknownAttributeError)

          raise UnknownAttributeError.new(self, k.to_s)
```

Follows: https://github.com/maybe-finance/maybe/pull/1561
This commit is contained in:
Kabiru Mwenja 2024-12-30 18:04:58 +03:00 committed by GitHub
parent b0d9891133
commit dba10c2bc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,9 +92,9 @@ class Demo::Generator
end
food = family.categories.find_by(name: "Food & Drink")
family.categories.create!(name: "Restaurants", parent_category: food)
family.categories.create!(name: "Groceries", parent_category: food)
family.categories.create!(name: "Alcohol & Bars", parent_category: food)
family.categories.create!(name: "Restaurants", parent: food)
family.categories.create!(name: "Groceries", parent: food)
family.categories.create!(name: "Alcohol & Bars", parent: food)
end
def create_merchants!