Module: Sequel::Plugins::ThroughAssociations::PrependClassMethods

Defined in:
lib/sequel/plugins/through_associations.rb

Overview

This ensures that our definition of associate jumps the stack

Instance Method Summary collapse

Instance Method Details

#associate(type, name, opts = OPTS, &block) ⇒ Object



27
28
29
30
31
32
33
34
35
36
# File 'lib/sequel/plugins/through_associations.rb', line 27

def associate type, name, opts = OPTS, &block

  # Handle associations that are based on others
  if opts[:through] && !type.to_s.include?("_through_")
    return associate_through type, name, opts, &block
  end

  super

end