Reputation: 2235
I want to guard to automatically reload my settingslogic settings when I change a settings file. I guessed putting this in the Guardfile would work, but it didn't. Any ideas?
guard 'settings' do
watch(%r{^config/.*settings\.yml$}) { "Settings.reload!" }
end
Upvotes: 0
Views: 236
Reputation: 5501
This won't work for several reasons:
guard-settings
, so you cannot use guard 'settings'
.I suggest to make use of Listen in your project (you don't mention if it's Rails, Sinatra, ...) with something like:
Listen.to('config') do |modified, added, removed|
Settings.reload!
end.start
Upvotes: 0