| Module | Sequel::Plugins::AssociationProxies::ClassMethods |
| In: |
lib/sequel/plugins/association_proxies.rb
|
| association_proxy_to_dataset | [R] | Proc that accepts a method name, array of arguments, and block and should return a truthy value to send the method to the dataset instead of the array of associated objects. |
Changes the association method to return a proxy instead of the associated objects directly.
# File lib/sequel/plugins/association_proxies.rb, line 99
99: def def_association_method(opts)
100: opts.returns_array? ? association_module_def(opts.association_method, opts){|*r, &block| AssociationProxy.new(self, opts, r[0], &block)} : super
101: end