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/exceptions.rb, line 41
def corrections
if @error.method_name
maybe_these = @error.routes.named_routes.helper_names.grep(/#{@error.route_name}/)
maybe_these -= [@error.method_name.to_s] # remove exact match
maybe_these.sort_by { |n|
DidYouMean::Jaro.distance(@error.route_name, n)
}.reverse.first(4)
else
[]
end
end
Defined in actionpack/lib/action_controller/metal/exceptions.rb line 41
· View on GitHub
· Improve this page
· Find usages on GitHub