mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Add method to reload settings #2925
This commit is contained in:
parent
e638b0db05
commit
6ff10268f3
2 changed files with 5 additions and 0 deletions
1
Gemfile
1
Gemfile
|
@ -25,6 +25,7 @@ gem 'validates_email_format_of', '1.6.3' # validates email against RFC 2822 and
|
||||||
gem 'paper_trail',
|
gem 'paper_trail',
|
||||||
github: 'airblade/paper_trail',
|
github: 'airblade/paper_trail',
|
||||||
ref: 'a453811226ec4ea59753ba6b827e390ced2fc140'
|
ref: 'a453811226ec4ea59753ba6b827e390ced2fc140'
|
||||||
|
# NB! if this gets upgraded, ensure Setting.reload_settings! still works correctly
|
||||||
gem 'rails-settings-cached', '0.4.1' # for settings
|
gem 'rails-settings-cached', '0.4.1' # for settings
|
||||||
|
|
||||||
# html-xml
|
# html-xml
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
class Setting < RailsSettings::CachedSettings
|
class Setting < RailsSettings::CachedSettings
|
||||||
include Versions # version/setting_version.rb
|
include Versions # version/setting_version.rb
|
||||||
|
|
||||||
|
def self.reload_settings!
|
||||||
|
Rails.cache.delete_matched('settings:.*')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue