kil-8w
Last Updated: February 25, 2016
·
671
· neutralino1
981494 10151466984546915 1613396205 o

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!

Say Thanks
Respond