Class: PassiveRecord::Associations::HasManyAssociation

Inherits:
Struct
  • Object
show all
Defined in:
lib/passive_record/associations/has_many.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#child_class_nameObject

Returns the value of attribute child_class_name

Returns:

  • (Object)

    the current value of child_class_name



3
4
5
# File 'lib/passive_record/associations/has_many.rb', line 3

def child_class_name
  @child_class_name
end

#children_name_symObject

Returns the value of attribute children_name_sym

Returns:

  • (Object)

    the current value of children_name_sym



3
4
5
# File 'lib/passive_record/associations/has_many.rb', line 3

def children_name_sym
  @children_name_sym
end

#parent_classObject

Returns the value of attribute parent_class

Returns:

  • (Object)

    the current value of parent_class



3
4
5
# File 'lib/passive_record/associations/has_many.rb', line 3

def parent_class
  @parent_class
end

Instance Method Details

#habtmObject



12
13
14
# File 'lib/passive_record/associations/has_many.rb', line 12

def habtm
  false #@habtm ||= false 
end

#target_name_symbolObject



8
9
10
# File 'lib/passive_record/associations/has_many.rb', line 8

def target_name_symbol
  children_name_sym
end

#to_relation(parent_model) ⇒ Object



4
5
6
# File 'lib/passive_record/associations/has_many.rb', line 4

def to_relation(parent_model)
  HasManyRelation.new(self, parent_model)
end