Last Updated: February 25, 2016
·
504
· dsgh

local config changes

Here's a neat little trick for when you want to test different configuration options and not be bothered by your source control tool about it:

Taking rails as an example, add this to the end of config/environments/development.rb

dev_local_file = File.join(File.dirname(__FILE__), "development_local.rb")
require dev_local_file if File.exists?(dev_local_file)

And then add config/environments/development_local.rb to your gitignore or similar.

Commit both these changes and now you're free to edit this new file, say by adding this:

Seedrs::Application.configure do
  config.action_controller.perform_caching = true
end