123456789_123456789_123456789_123456789_123456789_

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

[ GitHub ]

  
# File 'activerecord/lib/active_record/associations/errors.rb', line 204

def initialize(klass, macro, association_name, options, possible_sources)
  example_options = options.dup
  example_options[: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}, #{example_options}\n" \
        "  end"
       )
end