?– Note Each Active Record adaptor handles threads in its own way, and that way often depends on how the
underlying relational DBMS itself handles threads. You should refer to your specific adapter code and your
database documentation for more details.
CHAPTER 7 ?– WORKING WITH LEGACY SCHEMA 168
Threads are a powerful, yet complex, realm to explore. If you intend to do any applications
of any serious size, it would probably be worth your time to learn as much as you can about
how to best implement and manage them.
generate_read_methods
This is an attribute that you, again, set directly on the ActiveRecord::Base class; it tells Active
Record whether or not to dynamically generate reader methods. That is, it tells Active Record if it
should access an attribute directly and perform a type cast once the presence of a reader
method is established for that attribute or if it should always perform the task through the
method_missing method. The default value for this attribute is true.
The following example shows this setting in action with a simple benchmark to show the
time processing takes.
Pages:
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385