is there a way to let rails/active record handle duplicated records during an update on has_many through: relationships? The docs mention using a scope with distinct, but that still inserts dupes in the db
I can create a unique index, but then I need to maintain this myself
for reference: https://guides.rubyonrails.org/association_basics.html#scopes-for-has-many-distinct
Morning. I've created a many-to-many relationship using through as described here https://guides.rubyonrails.org/association_basics.html#choosing-between-has-many-through-and-has-and-belongs-to-many and rails/activerecord created each entity field representation in the join table in plural, "places_id" and "categories_id". Is that the normal behavior? inflector kicking in?
I ask because when I try to create an association when creating a record using attributes, it gives: POST /places ... error: unknown attribute "place_id" for CategoriesPlaces
regardind my question earlier today, I messed up in my migrations and used plural in t.belongs_to