Skip to content

Instantly share code, notes, and snippets.

@ravinggenius
Created July 5, 2014 16:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravinggenius/fc49d20f641504589d70 to your computer and use it in GitHub Desktop.
Save ravinggenius/fc49d20f641504589d70 to your computer and use it in GitHub Desktop.
Rails project configuration (see https://github.com/jkassemi/conf_conf)
## config/initializers/conf_conf.rb
# load user-specific environment files
# (env* should be added to .gitignore)
[
Rails.root + "env_#{Rails.env}.rb",
Rails.root + 'env.rb'
].each do |env_file|
require env_file if env_file.file?
end
# set defaults, typecast values and canonicalize configuration names
ConfConf.rails_configuration do
# Sets Rails.configuration.secret_key
config :secret_key
end
ENV['SECRET_KEY'] ||= 'secret key'
ENV['SECRET_KEY'] ||= 'test secret key'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment