validate() method is called; Validations.
validate() is included in calls to Base.save(). Override this method in your Active Record model
to specify functionality. For more information on callbacks, see Chapter 4.
before_validation_on_create()
This method is called before the Validations.validate() method but only on objects that
have not yet been saved. Validations.validate() is included in calls to Base.save(). Override
this method in your Active Record model to specify functionality. For more information on
callbacks, see Chapter 4.
before_validation_on_update()
This method, also called before the Validations.validate() method, is called only when the
object has already been saved and already has a corresponding record in the database.
APPENDIX ?– ACTIVE RECORD METHODS IN DETAIL 234
Validations.validate() is included in calls to Base.save(). Override this method in your
Active Record model to specify functionality. For more information on callbacks, see Chapter 4.
ActiveRecord::ConnectionAdapters::AbstractAdapter
Public Instance Methods
active?()
active? returns true if the connection is active and ready to perform database queries.
Pages:
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523