Apply Rubocop Style/RedundantAssignment (#23452)
parent
1487fcde93
commit
8c1b65c7dd
|
@ -97,8 +97,7 @@ module Omniauthable
|
||||||
def ensure_valid_username(starting_username)
|
def ensure_valid_username(starting_username)
|
||||||
starting_username = starting_username.split('@')[0]
|
starting_username = starting_username.split('@')[0]
|
||||||
temp_username = starting_username.gsub(/[^a-z0-9_]+/i, '')
|
temp_username = starting_username.gsub(/[^a-z0-9_]+/i, '')
|
||||||
validated_username = temp_username.truncate(30, omission: '')
|
temp_username.truncate(30, omission: '')
|
||||||
validated_username
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Setting < RailsSettings::Base
|
||||||
def [](key)
|
def [](key)
|
||||||
return super(key) unless rails_initialized?
|
return super(key) unless rails_initialized?
|
||||||
|
|
||||||
val = Rails.cache.fetch(cache_key(key, nil)) do
|
Rails.cache.fetch(cache_key(key, nil)) do
|
||||||
db_val = object(key)
|
db_val = object(key)
|
||||||
|
|
||||||
if db_val
|
if db_val
|
||||||
|
@ -35,7 +35,6 @@ class Setting < RailsSettings::Base
|
||||||
default_settings[key]
|
default_settings[key]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
val
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def all_as_records
|
def all_as_records
|
||||||
|
|
Loading…
Reference in New Issue