attr_accessible(*attributes)
This method takes an array of attributes and makes them the only available attributes for mass
assignment operations, such as with new(attributes) and attributes=(attributes). All other
attributes of the Active Record class become unavailable for mass assignment operations. The
attr_protected(*attributes) method is the reverse of this operation.
215
A P P E N D I X
?– ?– ?–
attr_protected(*attributes)
This method takes an array of attributes and makes them unavailable for mass assignment
operations, such as new(attributes) and attributes=(attributes). All other attributes of the
Active Record class remain unchanged. The attr_accessible(*attributes) method is the
reverse of this method.
base_class()
base_class returns the base Active Record class from which the specified Active Record class
descends.
benchmark(title, log_level = Logger::DEBUG, use_silence = true) {|| . . .}
This method logs and benchmarks the statements that are specified in its block:
Account.benchmark("Creating and Finding Account") do
account = Account.
Pages:
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487