Skip to content

Commit f9a0dbd

Browse files
committed
revert / disable Rails/Delegate
1 parent 6a380c3 commit f9a0dbd

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.rubocop.yml

+3
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ Performance/CollectionLiteralInLoop:
123123
Rails/ApplicationRecord:
124124
Enabled: false
125125

126+
Rails/Delegate:
127+
Enabled: false
128+
126129
# This cop only applies to app dev, not gem dev.
127130
Rails/RakeEnvironment:
128131
Enabled: false

spec/dummy_app/app/models/person.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ def load(value)
4040
end
4141
end
4242

43-
delegate :dump, to: :class
43+
def dump(zone)
44+
self.class.dump(zone)
45+
end
4446

45-
delegate :load, to: :class
47+
def load(value)
48+
self.class.load(value)
49+
end
4650
end
4751

4852
# Rails 7.1 deprecates positional argument for coder

0 commit comments

Comments
 (0)