Browse files

Fix conditional from previous commit to work on Rails versions before…

… version method was defined.

Signed-off-by: Hemant Kumar <gethemant@gmail.com>
  • Loading branch information...
1 parent 707289a commit 663930d6160bf5164083dcfcd137b42ac85cabf5 @miloops miloops committed with Jul 4, 2009
Showing with 2 additions and 3 deletions.
  1. +2 −3 script/load_worker_env.rb
View
5 script/load_worker_env.rb
@@ -19,9 +19,8 @@
if !(::Packet::WorkerRunner::WORKER_OPTIONS[:worker_env] == false)
require RAILS_HOME + "/config/environment"
- 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")
+ if (Object.const_defined?(:Rails) && (!Rails.respond_to?(:version) || Rails.version < "2.2.2")) ||
+ (Object.const_defined?(:RAILS_GEM_VERSION) && RAILS_GEM_VERSION < "2.2.2")
ActiveRecord::Base.allow_concurrency = true
end
end

1 comment on commit 663930d

@olegueret

Method load_rails_env from master_proxy.rb also needs this fix.

Please sign in to comment.