class Vorpal::Config::BelongsToConfig
@private Object association terminology:
-
All object associations are uni-directional
-
The end that holds the association is the ‘Owner’ and the end that is referred to is the ‘Associate’ or ‘Associates’
Relational association terminology:
-
Local end: has FK
-
Remote end: has no FK
Attributes
associated_classes[R]
association_config[RW]
fk[R]
fk_type[R]
name[R]
owned[R]
unique_key_name[R]
Public Instance Methods
associate(owner, associate)
click to toggle source
# File lib/vorpal/config/belongs_to_config.rb, line 26 def associate(owner, associate) owner.send("#{name}=", associate) end
get_associated(owner)
click to toggle source
# File lib/vorpal/config/belongs_to_config.rb, line 22 def get_associated(owner) owner.send(name) end
pretty_name()
click to toggle source
# File lib/vorpal/config/belongs_to_config.rb, line 30 def pretty_name "#{association_config.local_class_config.domain_class.name} belongs_to :#{name}" end