Commit 10d8b77b500e708f39f565f7f020814b4446a419
1 parent
ebcbe0c8
Exists in
master
and in
4 other branches
Clean old rails2 style code
Showing
1 changed file
with
2 additions
and
4 deletions
Show diff stats
config/initializers/4_resque.rb
1 | 1 | # Custom Redis configuration |
2 | -rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..' | |
3 | -rails_env = ENV['RAILS_ENV'] || 'development' | |
4 | -config_file = File.join(rails_root, 'config', 'resque.yml') | |
2 | +config_file = Rails.root.join('config', 'resque.yml') | |
5 | 3 | |
6 | 4 | if File.exists?(config_file) |
7 | 5 | resque_config = YAML.load_file(config_file) |
8 | - Resque.redis = resque_config[rails_env] | |
6 | + Resque.redis = resque_config[Rails.env] | |
9 | 7 | end |
10 | 8 | |
11 | 9 | # Queues | ... | ... |