on mutable objects → Complex association model → Leaky abstractions → [ActiveRecord] tight coupling with database schema → [ActiveRecord] n+1 query problem → [ActiveRecord] callbacks → [ActiveRecord] huge API
:tasks, override: true, view: :for_users end end end class Tasks < ROM::Relation[:yaml] gateway :external schema(infer: true) def for_users(users) tasks.restrict(UserId: users.pluck(:id)) end end
:tasks, override: true, view: :for_users end end end class Tasks < ROM::Relation[:yaml] gateway :external schema(infer: true) def for_users(users) tasks.restrict(UserId: users.pluck(:id)) end end