Ezra Z. wrote:
On Jul 5, 2006, at 1:52 PM, Robert J. wrote:
Any help most appreciated
Using ActiveRecord objects over drb just takes a little extra step.
Try adding this line into your Pupil model:
class Pupil < ActiveRecord::Base
rest of code
That should get you where you are going. Maybe you can express what
you are trying to do and I can help you find a better solution to do
what you want. You don’t have to use progress if you don’t need it.
Let me know if you have any more questions.
Hi Ezra! Thanks for the help, and a great big thank you for the work
you’re doing on BackgrounDrb
Your tip makes the test worker work fine - do I need to include
DRbUndumped in every model that I’m going to use individually? I tried
to be smart and put the include into
in environment.rb but this didn’t work. Is there a smart way to
automatically include this in every model class?
To answer your question, what I’m trying to do is to gather together a
hefty pile of ActiveRecord objects, with all the associations, in a
background job, so that the browser doesn’t risk timing out. Once all
this stuff is done, I redirect to the output .rhtml file. At this point
it should be quick, because there are no more calls to ActiveRecord
needed. I definitely want a progress bar.
I think I’m there now in theory (!) , but I’d rather wait to see if
there’s a neat way to do what I asked above before I go ahead and stick
the same include into a dozen different files. It seems like a bug
waiting to happen if I have to remember to include DRbUndumped in every