Exception: ActiveRecord::AmbiguousSourceReflectionForThroughAssociation
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
ActiveRecordError ,
StandardError
|
|
Instance Chain:
self,
ActiveRecordError ,
StandardError
|
|
Inherits: |
ActiveRecord::ActiveRecordError
|
Defined in: | activerecord/lib/active_record/associations/errors.rb |
Class Method Summary
Constructor Details
.new(klass, macro, association_name, options, possible_sources) ⇒ AmbiguousSourceReflectionForThroughAssociation
# File 'activerecord/lib/active_record/associations/errors.rb', line 204
def initialize(klass, macro, association_name, , possible_sources) = .dup [:source] = possible_sources.first super("Ambiguous source reflection for through association. Please " \ "specify a :source directive on your declaration like:\n" \ "\n" \ " class #{klass} < ActiveRecord::Base\n" \ " #{macro} :#{association_name}, #{}\n" \ " end" ) end