Class: Togo::DataMapper::ManyToOne
Instance Method Summary
collapse
create, #initialize, #relate, #unset_values
Instance Method Details
#find_for_assignment ⇒ Object
13
14
15
|
# File 'lib/togo/model/relationship_manager/many_to_one.rb', line 13
def find_for_assignment
related_model.get(@ids.first)
end
|
9
10
11
|
# File 'lib/togo/model/relationship_manager/many_to_one.rb', line 9
def related_model
@relationship.parent_model
end
|
#unset_value ⇒ Object
5
6
7
|
# File 'lib/togo/model/relationship_manager/many_to_one.rb', line 5
def unset_value
nil
end
|