mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-10 20:17:08 +01:00
19 lines
389 B
Ruby
19 lines
389 B
Ruby
# frozen_string_literal: true
|
|
|
|
Rails.application.config.to_prepare do
|
|
custom_css = begin
|
|
Setting.custom_css
|
|
rescue ActiveRecord::AdapterError # Running without a database, not migrated, no connection, etc
|
|
nil
|
|
end
|
|
|
|
if custom_css.present?
|
|
Rails
|
|
.cache
|
|
.write(
|
|
:setting_digest_custom_css,
|
|
Digest::SHA256.hexdigest(custom_css)
|
|
)
|
|
end
|
|
end
|