akkounts/app/models/concerns/settings/remote_storage_settings.rb
Râu Cao 4ae10c9b53
All checks were successful
continuous-integration/drone/push Build is passing
Refactor settings model
Move the various sections to their own concerns, so they're easier to
find and maintain
2024-08-28 14:39:08 +02:00

17 lines
419 B
Ruby

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