I have a standard many_to_ many with a model for the join table. The join table has an extra attribute, "quantity".
class Plan < Sequel::Model
# join table with extra column "quantity"
class CapabilitiesPlans < Sequel::Model
class Capability < Sequel::Model
I can create the join record directly but that doesn't feel like the sequel way.
CapabilitiesPlans.create(capability_id: c.id, plan_id: p.id, quantity:5)
But how can I modify this syntax to add quantity?
How to add the extra attribute using the add_association method?
These two don't work:
p.add_capability(c, quantity: 5)
I feel I must be missing something obvious but I've studied the docs and posts on here and have struck out!
I'd be happy to author documentation for this once I learn.