Module: Sequel::Plugins::AssociationProxies::ClassMethods
- Defined in:
- lib/sequel/plugins/association_proxies.rb
Instance Method Summary collapse
-
#def_association_method(opts) ⇒ Object
Changes the association method to return a proxy instead of the associated objects directly.
Instance Method Details
#def_association_method(opts) ⇒ Object
Changes the association method to return a proxy instead of the associated objects directly.
43 44 45 |
# File 'lib/sequel/plugins/association_proxies.rb', line 43 def def_association_method(opts) opts.returns_array? ? association_module_def(opts.association_method, opts){|*r| AssociationProxy.new(self, opts, r[0])} : super end |