Forum: Ruby on Rails move to AR 3.2.1, now thread behaves differently

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jedrin (Guest)
on 2012-06-01 16:19
(Received via mailing list)
I have this piece of code below. It used to work fine, I was using
active record 2.3.8. I upgraded to
active record 3.2.1 and moved some gems into a gemfile. Now what
happens is rec below is an active record instance, when I enter the
thread it appears to become nil. The method repopulate() is not longer
defined. Why would that happen ?

  def new_thread(slot,&block)
    th =
    @pool[slot] = th


  p rec.respond_to?(:repopulate) # this is fine
  @tpool.new_thread(slot) do # see method definition above
       Thread.current[:rset_fact] = model
       puts 'in thread'
       p rec.respond_to?(:repopulate) # no longer defined
       rec.repopulate # error rec is nil
This topic is locked and can not be replied to.