method

corrections

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::HasManyThroughAssociationNotFoundError
corrections() 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 90
      def corrections
        if owner_class && reflection
          @corrections ||= begin
            maybe_these = owner_class.reflections.keys
            maybe_these -= [reflection.name.to_s] # remove failing reflection
            DidYouMean::SpellChecker.new(dictionary: maybe_these).correct(reflection.options[:through].to_s)
          end
        else
          []
        end
      end
Register or log in to add new notes.