Skip to content
This repository has been archived by the owner on Jan 13, 2018. It is now read-only.

Commit

Permalink
[rails_env_configs] No need to save config in a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenj committed Feb 19, 2013
1 parent 20d7010 commit 861658a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recipes/rails_env_configs/rails_env_configs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
task :copy do
run "mkdir -p #{shared_path}/config"

CONFIG = YAML.load_file(%Q{./config/#{name}.yml})[rails_env.to_s]
config = YAML.load_file(%Q{./config/#{name}.yml})[rails_env.to_s]
file = "#{rails_env.to_s}:\n"
file << CONFIG.map{|key, value| " #{key}: #{value}\n"}.join
file << config.map{|key, value| " #{key}: #{value}\n"}.join

put file, "#{shared_path}/config/#{name}.yml"
end
Expand Down

0 comments on commit 861658a

Please sign in to comment.