Permalink
Browse files

fix DEPRECATION WARNING: ActiveRecord::Base.allow_concurrency=

Signed-off-by: Hemant Kumar <gethemant@gmail.com>
  • Loading branch information...
1 parent 43d025b commit 707289a1e9b27009facf4329837a749b6a95b808 @eyvoro eyvoro committed with Jul 3, 2009
Showing with 5 additions and 1 deletion.
  1. +5 −1 script/load_worker_env.rb
@@ -19,7 +19,11 @@
if !(::Packet::WorkerRunner::WORKER_OPTIONS[:worker_env] == false)
require RAILS_HOME + "/config/environment"
- ActiveRecord::Base.allow_concurrency = true
+ if(Object.const_defined?(:Rails) && Rails.version < "2.2.2")
+ ActiveRecord::Base.allow_concurrency = true
+ elsif(Object.const_defined?(:RAILS_GEM_VERSION) && RAILS_GEM_VERSION < "2.2.2")
+ ActiveRecord::Base.allow_concurrency = true
+ end
end
require "backgroundrb_server"

0 comments on commit 707289a

Please sign in to comment.