Skip to content

Commit 5f45aea

Browse files
committed
:nodoc: for corrections
Like all others for corrections already does.
1 parent 32bac31 commit 5f45aea

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

actionpack/lib/abstract_controller/base.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
module AbstractController
1010
# Raised when a non-existing controller action is triggered.
1111
class ActionNotFound < StandardError
12-
attr_reader :controller, :action
13-
def initialize(message = nil, controller = nil, action = nil)
12+
attr_reader :controller, :action # :nodoc:
13+
14+
def initialize(message = nil, controller = nil, action = nil) # :nodoc:
1415
@controller = controller
1516
@action = action
1617
super(message)
1718
end
1819

1920
if defined?(DidYouMean::Correctable) && defined?(DidYouMean::SpellChecker)
20-
include DidYouMean::Correctable
21+
include DidYouMean::Correctable # :nodoc:
2122

22-
def corrections
23+
def corrections # :nodoc:
2324
@corrections ||= DidYouMean::SpellChecker.new(dictionary: controller.class.action_methods).correct(action)
2425
end
2526
end

actionpack/lib/action_controller/metal/strong_parameters.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def initialize(param, keys = nil) # :nodoc:
2828
end
2929

3030
if defined?(DidYouMean::Correctable) && defined?(DidYouMean::SpellChecker)
31-
include DidYouMean::Correctable
31+
include DidYouMean::Correctable # :nodoc:
3232

33-
def corrections
33+
def corrections # :nodoc:
3434
@corrections ||= DidYouMean::SpellChecker.new(dictionary: keys).correct(param.to_s)
3535
end
3636
end

actionview/lib/action_view/template/error.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def initialize(paths, path, prefixes, partial, details, *)
5656
if defined?(DidYouMean::Correctable) && defined?(DidYouMean::Jaro)
5757
include DidYouMean::Correctable
5858

59-
Result = Struct.new(:path, :score)
59+
class Results # :nodoc:
60+
Result = Struct.new(:path, :score)
6061

61-
class Results
6262
def initialize(size)
6363
@size = size
6464
@results = []

railties/lib/rails/command/base.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Error < Thor::Error # :nodoc:
1616

1717
class CorrectableError < Error # :nodoc:
1818
attr_reader :key, :options
19+
1920
def initialize(message, key, options)
2021
@key = key
2122
@options = options

0 commit comments

Comments
 (0)