module Sequel::Plugins::AutoRestrictEagerGraph::ClassMethods
Public Instance Methods
associate(type, name, opts = OPTS, &block)
click to toggle source
When defining an association, if a block is given for the association, but a :graph_* option is not used, disallow the use of eager_graph.
Calls superclass method
# File lib/sequel/plugins/auto_restrict_eager_graph.rb, line 49 def associate(type, name, opts = OPTS, &block) opts = super if opts[:block] && !opts.has_key?(:allow_eager_graph) && !opts[:orig_opts].any?{|k,| /\Agraph_/ =~ k} opts[:allow_eager_graph] = false end opts end