Class: Togo::DataMapper::OneToMany

Inherits:
RelationshipManager show all
Defined in:
lib/togo/model/relationship_manager/one_to_many.rb

Instance Method Summary collapse

Methods inherited from RelationshipManager

create, #initialize, #relate, #unset_values

Constructor Details

This class inherits a constructor from Togo::DataMapper::RelationshipManager

Instance Method Details

#find_for_assignmentObject



13
14
15
# File 'lib/togo/model/relationship_manager/one_to_many.rb', line 13

def find_for_assignment
  related_model.all(:id => @ids)
end


9
10
11
# File 'lib/togo/model/relationship_manager/one_to_many.rb', line 9

def related_model
  @relationship.child_model
end

#unset_valueObject



5
6
7
# File 'lib/togo/model/relationship_manager/one_to_many.rb', line 5

def unset_value
  []
end