Permalink
Browse files

Merge pull request #23 from davesmylie/edge

  • Loading branch information...
2 parents d06c701 + fc52089 commit 0e1ab99b8c90ec16f6163641d9e84005fea01263 @tra committed Sep 6, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/spawn.rb
View
@@ -119,7 +119,8 @@ def spawn(opts = {})
options[:method].call(proc { yield })
elsif options[:method] == :thread
# for versions before 2.2, check for allow_concurrency
- if RAILS_2_2 || ActiveRecord::Base.allow_concurrency
+ if RAILS_2_2 || ActiveRecord::Base.respond_to?(:allow_concurrency) ?
+ ActiveRecord::Base.allow_concurrency : Rails.application.config.allow_concurrency
thread_it(options) { yield }
else
@@logger.error("spawn(:method=>:thread) only allowed when allow_concurrency=true")

0 comments on commit 0e1ab99

Please sign in to comment.