Autofix Rubocop remaining Layout rules (#23679)
This commit is contained in:
parent
d2dcb6c45a
commit
717683d1c3
117 changed files with 265 additions and 261 deletions
|
@ -1,4 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: settings
|
||||
|
@ -30,6 +31,7 @@ class Setting < RailsSettings::Base
|
|||
default_value = default_settings[key]
|
||||
|
||||
return default_value.with_indifferent_access.merge!(db_val.value) if default_value.is_a?(Hash)
|
||||
|
||||
db_val.value
|
||||
else
|
||||
default_settings[key]
|
||||
|
@ -43,6 +45,7 @@ class Setting < RailsSettings::Base
|
|||
|
||||
default_settings.each do |key, default_value|
|
||||
next if records.key?(key) || default_value.is_a?(Hash)
|
||||
|
||||
records[key] = Setting.new(var: key, value: default_value)
|
||||
end
|
||||
|
||||
|
@ -51,6 +54,7 @@ class Setting < RailsSettings::Base
|
|||
|
||||
def default_settings
|
||||
return {} unless RailsSettings::Default.enabled?
|
||||
|
||||
RailsSettings::Default.instance
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue