Flowdock
method

new

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: AmbiguousSourceReflectionForThroughAssociation
new(klass, macro, association_name, options, possible_sources) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations.rb, line 123
    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
Register or log in to add new notes.