Class: ActiveRecord::Associations::HasOneThroughAssociation
- Inherits:
-
HasOneAssociation
- Object
- AssociationProxy
- SingularAssociation
- HasOneAssociation
- ActiveRecord::Associations::HasOneThroughAssociation
- Includes:
- ThroughAssociation
- Defined in:
- activerecord/lib/active_record/associations/has_one_through_association.rb
Instance Attribute Summary
Attributes inherited from AssociationProxy
Instance Method Summary (collapse)
Methods inherited from SingularAssociation
Methods inherited from AssociationProxy
#===, #aliased_table_name, #initialize, #inspect, #loaded!, #loaded?, #method_missing, #proxy_owner, #proxy_reflection, #reload, #reset, #respond_to?, #scoped, #send, #stale_target?, #to_param
Constructor Details
This class inherits a constructor from ActiveRecord::Associations::AssociationProxy
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveRecord::Associations::AssociationProxy
Instance Method Details
- (Object) replace(record)
7 8 9 10 |
# File 'activerecord/lib/active_record/associations/has_one_through_association.rb', line 7 def replace(record) create_through_record(record) self.target = record end |