settingslogic icon indicating copy to clipboard operation
settingslogic copied to clipboard

reload settings without server restart

Open godwinko opened this issue 15 years ago • 2 comments

Is it possible to reload settings without restart the entire server?

godwinko avatar Dec 09 '09 07:12 godwinko

Settings.reload!

mcmlxxxiii avatar Jul 07 '10 20:07 mcmlxxxiii

So incase this helps anyone on Rails. I put my settings.rb in app/models and made it look like this:

class Settings < Settingslogic
  source "#{Rails.root}/config/application.yml"
  namespace Rails.env
  load!
end

Settings.reload!

Haven't tried it in prod yet, but works great for live reloading in dev mode.

matschaffer avatar Nov 07 '11 15:11 matschaffer