1
0
mirror of https://github.com/glitch-soc/mastodon.git synced 2025-02-23 19:13:47 -05:00

19 lines
389 B
Ruby
Raw Normal View History

# 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