method
corrections
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::InverseOfAssociationNotFoundError
corrections()public
No documentation available.
# File activerecord/lib/active_record/associations/errors.rb, line 49
def corrections
if reflection && associated_class
@corrections ||= begin
maybe_these = associated_class.reflections.keys
DidYouMean::SpellChecker.new(dictionary: maybe_these).correct(reflection.options[:inverse_of].to_s)
end
else
[]
end
end