module Sequel::Plugins::AssociationProxies::ClassMethods

def def_association_method(opts)

directly.
Changes the association method to return a proxy instead of the associated objects
def def_association_method(opts)
  if opts.returns_array?
    association_module_def(opts.association_method, opts) do |dynamic_opts=OPTS, &block|
      AssociationProxy.new(self, opts, dynamic_opts, &block)
    end
  else
    super
  end
end