instance method
corrections
Ruby on Rails 6.1.7.10
Since v6.1.7.10 Last seen in v6.1.7.10Signature
corrections()
No documentation comment.
Source
# File actionpack/lib/action_controller/metal/strong_parameters.rb, line 35
def corrections
if @error.param && @error.keys
maybe_these = @error.keys
maybe_these.sort_by { |n|
DidYouMean::Jaro.distance(@error.param.to_s, n)
}.reverse.first(4)
else
[]
end
end
Defined in actionpack/lib/action_controller/metal/strong_parameters.rb line 35
· View on GitHub
· Improve this page
· Find usages on GitHub