Class: ActiveRecord::Associations::Builder::HasOne
- Inherits:
-
SingularAssociation
- Object
- Association
- SingularAssociation
- ActiveRecord::Associations::Builder::HasOne
- Defined in:
- 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(o, name, touch) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/active_record/associations/builder/has_one.rb', line 35 def self.touch_record(o, name, touch) record = o.send name return unless record && record.persisted? if touch != true record.touch(touch) else record.touch end end |