U can do the following:
class Registration
belongs_to :first_person, :class_name => User, :child_key =>
[:first_person_id]
belongs_to :second_person, :class_name => User, :child_key =>
[:second_person_id]
end
See http://datamapper.org/doku.php?id=docs:associations
Cheers
Maybe u can try the following:
form_for @registration do
fields_for :first_person_address do
text_field :street_address # , :value =>
@registration.first_person.address.street_address
end
fields_for :second_person_address do
text_field :street_address # , :value =>
@registration.second_person.address.street_address
end
end
The :value is needed if :street_address is editable. U may even need
to throw in a hidden field for :id, depending on ur requirements.
:] TY