method

new

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: AssociationNotFoundError
new(record = nil, association_name = nil) 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 7
    def initialize(record = nil, association_name = nil)
      @record           = record
      @association_name = association_name
      if record && association_name
        super("Association named '#{association_name}' was not found on #{record.class.name}; perhaps you misspelled it?")
      else
        super("Association was not found.")
      end
    end
Register or log in to add new notes.