class Vorpal::Config::HasManyConfig

@private Object association terminology:

Relational association terminology:

Attributes

associated_class[R]
association_config[RW]
fk[R]
fk_type[R]
name[R]
owned[R]
unique_key_name[R]

Public Instance Methods

associate(owner, associates) click to toggle source
# File lib/vorpal/config/has_many_config.rb, line 26
def associate(owner, associates)
  if get_associated(owner).nil?
    owner.send("#{name}=", [])
  end
  get_associated(owner) << associates
end
get_associated(owner) click to toggle source
# File lib/vorpal/config/has_many_config.rb, line 22
def get_associated(owner)
  owner.send(name)
end
pretty_name() click to toggle source
# File lib/vorpal/config/has_many_config.rb, line 33
def pretty_name
  "#{@class_config.domain_class.name} has_many :#{name}"
end