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:
Instance Attribute Summary
Attributes inherited from Association
#model, #name, #options, #reflection
Instance Method Summary collapse
Methods inherited from SingularAssociation
Methods inherited from Association
Constructor Details
This class inherits a constructor from ActiveRecord::Associations::Builder::Association
Instance Method Details
#build ⇒ Object
16 17 18 19 20 |
# File 'lib/active_record/associations/builder/has_one.rb', line 16 def build reflection = super configure_dependency unless [:through] reflection end |
#constructable? ⇒ Boolean
12 13 14 |
# File 'lib/active_record/associations/builder/has_one.rb', line 12 def constructable? ![:through] end |