Displaying 1 result from an estimated 1 matches for "some_zip".
Did you mean:
some_ip
2006 Jun 16
3
Does HABTM support non "id" FKs?
...del:
class ZipCode < Active....
has_and_belongs_to_many :counties, :foreign_key => "zip_code"
class County < Active...
has_and_belongs_to_many :zip_codes, :association_foreign_key =>
"zip_code"
AR still uses ZipCode.id when I call county.zip_codes << some_zip,
instead of ZipCode.zipcode, which is the preferred behavior.
Am I doing something wrong or is AR ignoring me? To solve the problem i
simply made the ID of the ZipCode equal to the ZipCode, but I would like
to know what I''m doing wrong.
Thanks in advance.
--
Posted via http://www.ru...