Skip to content

Commit

Permalink
[C] Ensure settings always have up-to-date FA cache
Browse files Browse the repository at this point in the history
During initialization, we should check to make sure that the settings
are refreshed to the latest version of the cache in order to pick up
any new defaults that may have been added.
  • Loading branch information
scryptmouse authored and zdavis committed Nov 29, 2023
1 parent 3184109 commit 0e4bd88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/config/initializers/15_update_settings_from_env.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Rails.application.configure do
config.after_initialize do
Settings.potentially_update_from_environment!

Settings.instance.refresh_formatted_attributes_cache! if Settings.table_exists?
rescue NoMethodError
Rails.logger.warn <<~TEXT
Unable to update settings from environment due to NoMethodError. This could be due
Expand Down

0 comments on commit 0e4bd88

Please sign in to comment.