From 6a96af4d20129cea06c716393338aa4f730b7b35 Mon Sep 17 00:00:00 2001 From: abcang Date: Wed, 15 Jul 2020 02:05:07 +0900 Subject: Fix rubocop warning (#14288) * Fix rubocop warning * use limit variable * use ContextCreatingMethods option --- app/lib/settings/scoped_settings.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/lib/settings') diff --git a/app/lib/settings/scoped_settings.rb b/app/lib/settings/scoped_settings.rb index 9ca39510a..3bec9bd56 100644 --- a/app/lib/settings/scoped_settings.rb +++ b/app/lib/settings/scoped_settings.rb @@ -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) -- cgit