Class | Sequel::Plugins::AssociationProxies::AssociationProxy |
In: |
lib/sequel/plugins/association_proxies.rb
|
Parent: | BasicObject |
A proxy for the association. Calling an array method will load the associated objects and call the method on the associated object array. Calling any other method will call that method on the association‘s dataset.
DEFAULT_PROXY_TO_DATASET | = | proc do |opts| array_method = array.respond_to?(opts[:method]) | Default proc used to determine whether to send the method to the dataset. If the array would respond to it, sends it to the array instead of the dataset. | |
DEFAULT_PROXY_TO_DATASET | = | proc{|opts| !array.respond_to?(opts[:method])} | :nocov: |