Clowne doesn't include any association by default and doesn't provide magic
include_all declaration (although you can add one by yourself).
Nevertheless, sometimes you might want to exclude already added associations (when inheriting a cloner or using traits).
Consider an example:
class UserCloner < Clowne::Cloner include_association :posts trait :without_posts do exclude_association :posts end end # copy user and posts clone = UserCloner.call(user) clone.posts.count == user.posts.count # => true # copy only user clone2 = UserCloner.call(user, traits: :without_posts) clone2.posts # => 
NOTE: once excluded association cannot be re-included, e.g. the following cloner:
class UserCloner < Clowne::Cloner exclude_association :comments trait :with_comments do # That wouldn't work include_association :comments end end clone = UserCloner.call(user, traits: :with_comments) clone.comments.empty? #=> true
Why so? That allows us to have a deterministic cloning plan when combining multiple traits (or inheriting cloners).
Exclude multiple associations
It's possible to exclude multiple associations at once the same way as
class UserCloner < Clowne::Cloner include_associations :accounts, :posts, :comments trait :without_posts do exclude_associations :posts, :comments end end