Refactor settings model
All checks were successful
continuous-integration/drone/push Build is passing

Move the various sections to their own concerns, so they're easier to
find and maintain
This commit is contained in:
2024-08-28 14:39:08 +02:00
parent 45137e0cfe
commit 4ae10c9b53
15 changed files with 276 additions and 216 deletions

View File

@@ -0,0 +1,16 @@
module Settings
module RemoteStorageSettings
extend ActiveSupport::Concern
included do
field :remotestorage_enabled, type: :boolean,
default: ENV["RS_STORAGE_URL"].present?
field :rs_storage_url, type: :string,
default: ENV["RS_STORAGE_URL"].presence
field :rs_redis_url, type: :string,
default: ENV["RS_REDIS_URL"] || "redis://localhost:6379/1"
end
end
end