You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stevenhaddox edited this page Aug 26, 2011
·
3 revisions
If you want to be able to use your settingslogic Setting class within your Rails initializers it's fairly easy. Just move your app/models/setting.rb model contents to the top of your config/application.rb, like so:
#/config/application.rb
require 'settingslogic'
class Settings < Settingslogic
source "config/application.yml"
namespace Rails.env
load!
end
module <AppName>
...
Hope this helps someone else as I really wanted to enable / disable things (like Mailcatcher configs) in my initializers but wanted those flags to exist on a per-server basis.