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 1313RuboCop ::Rails ::Inject . defaults!
1414
1515require_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
4747 (send _ ${:try :try!} $_ ...)
4848 PATTERN
4949
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-
5950 def self . autocorrect_incompatible_with
6051 [ Style ::RedundantSelf ]
6152 end
You can’t perform that action at this time.
0 commit comments