Class: Dynomite::Associations::BelongsTo
- Inherits:
-
Object
- Object
- Dynomite::Associations::BelongsTo
- Includes:
- SingleAssociation
- Defined in:
- lib/dynomite/associations/belongs_to.rb
Instance Attribute Summary
Attributes included from Association
#loaded, #name, #options, #source
Instance Method Summary collapse
Methods included from SingleAssociation
#==, #associate, #associate_one_way, #create, #create!, #declaration_field_name, #disassociate, #disassociate_one_way, #empty?, #method_missing, #nil?, #reader_target, #respond_to_missing?, #setter
Methods included from Association
#coerce_to_id, #coerce_to_item, #declaration_field_name, #find_target, #initialize, #loaded?, #reader_target, #reset, #target
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Dynomite::Associations::SingleAssociation
Instance Method Details
#declaration_field_type ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/dynomite/associations/belongs_to.rb', line 8 def declaration_field_type if [:foreign_key] target_class.attributes[target_class.partition_key][:type] else :set end end |