James West wrote:
> Further testing shows that if I use a hidden contact_id field in the
> address form the contact_id gets passed to the params hash as I would
> expect but I still get the
>
You either have to change:
has_one :administrator,
:dependent => :destroy
to:
has_many :administrators,
:dependent => :destroy
or remove the administrator_addresses association and do this..
def administrator_addresses
administrator.addresses
end
your through relation should go through a 'has_many' and not a
'has_one'..
hth
ilan
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---