Last Updated: February 25, 2016
·
852
· neutralino1

Easy Rails app-wide settings

Use rails_config for app-wide environment-dependent settings.

In your Gemfile:

gem "rails_config"

Generate settings files:

rails g rails_config:install

And you can fill these up:

config/settings.yml
config/settings/development.yml
config/settings/production.yml
config/settings/test.yml

with settings.
They will be available throughout your app via

Settings.my_settings_category.my_setting

Easy!