Class: ActiveRecord::Associations::Builder::HasOne
- Inherits:
-
SingularAssociation
- Object
- Association
- SingularAssociation
- ActiveRecord::Associations::Builder::HasOne
- Defined in:
- activerecord/lib/active_record/associations/builder/has_one.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Association
Class Method Summary collapse
Methods inherited from Association
Class Method Details
.touch_record(record, name, touch) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'activerecord/lib/active_record/associations/builder/has_one.rb', line 36 def self.touch_record(record, name, touch) instance = record.send(name) if instance&.persisted? touch != true ? instance.touch(touch) : instance.touch end end |