File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 13
13
RuboCop ::Rails ::Inject . defaults!
14
14
15
15
require_relative 'rubocop/cop/rails_cops'
16
+
17
+ RuboCop ::Cop ::Style ::RedundantSelf . singleton_class . prepend (
18
+ Module . new do
19
+ def autocorrect_incompatible_with
20
+ super . push ( RuboCop ::Cop ::Rails ::SafeNavigation )
21
+ end
22
+ end
23
+ )
Original file line number Diff line number Diff line change @@ -47,15 +47,6 @@ class SafeNavigation < Base
47
47
(send _ ${:try :try!} $_ ...)
48
48
PATTERN
49
49
50
- # Monkey patching for `Style/RedundantSelf` of RuboCop core.
51
- # rubocop:disable Style/ClassAndModuleChildren
52
- class Style ::RedundantSelf
53
- def self . autocorrect_incompatible_with
54
- [ Rails ::SafeNavigation ]
55
- end
56
- end
57
- # rubocop:enable Style/ClassAndModuleChildren
58
-
59
50
def self . autocorrect_incompatible_with
60
51
[ Style ::RedundantSelf ]
61
52
end
You can’t perform that action at this time.
0 commit comments