0
0
Fork 0

Fix rubocop warning (#14288)

* Fix rubocop warning

* use limit variable

* use ContextCreatingMethods option
This commit is contained in:
abcang 2020-07-15 02:05:07 +09:00 committed by GitHub
parent a8e84a18f1
commit 6a96af4d20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 7 deletions

View file

@ -11,7 +11,7 @@ module Settings
@object = object
end
# rubocop:disable Style/MethodMissing
# rubocop:disable Style/MethodMissingSuper
def method_missing(method, *args)
method_name = method.to_s
# set a value for a variable
@ -24,7 +24,7 @@ module Settings
self[method_name]
end
end
# rubocop:enable Style/MethodMissing
# rubocop:enable Style/MethodMissingSuper
def respond_to_missing?(*)
true
@ -48,7 +48,6 @@ module Settings
record.update!(value: value)
Rails.cache.write(Setting.cache_key(key, @object), value)
value
end
def [](key)