Skip to content

Commit 82729ab

Browse files
committed
Add rubocop exception for code written by rails
We would like to keep rails code as close to rails code in our monkeypatches.
1 parent fb7dece commit 82729ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/active_record/virtual_attributes/virtual_fields.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ def call
170170
class Branch
171171
prepend(Module.new {
172172
# from branched.rb 7.0
173+
# not going to modify rails code for rubocops
174+
# rubocop:disable Lint/AmbiguousOperatorPrecedence
173175
def grouped_records
174176
h = {}
175177
polymorphic_parent = !root? && parent.polymorphic?
@@ -184,6 +186,7 @@ def grouped_records
184186
end
185187
h
186188
end
189+
# rubocop:enable Lint/AmbiguousOperatorPrecedence
187190

188191
# branched.rb 7.0
189192
def preloaders_for_reflection(reflection, reflection_records)

0 commit comments

Comments
 (0)