Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean old rails2 style code

  • Loading branch information...
commit 10d8b77b500e708f39f565f7f020814b4446a419 1 parent ebcbe0c
@simonoff simonoff authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 config/initializers/4_resque.rb
View
6 config/initializers/4_resque.rb
@@ -1,11 +1,9 @@
# Custom Redis configuration
-rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
-rails_env = ENV['RAILS_ENV'] || 'development'
-config_file = File.join(rails_root, 'config', 'resque.yml')
+config_file = Rails.root.join('config', 'resque.yml')
if File.exists?(config_file)
resque_config = YAML.load_file(config_file)
- Resque.redis = resque_config[rails_env]
+ Resque.redis = resque_config[Rails.env]
end
# Queues
Please sign in to comment.
Something went wrong with that request. Please try again.