Displaying 1 result from an estimated 1 matches for "subtype_id".
2006 Mar 05
1
Help with Self-Referential HABTM
...rm is also submitting
info for the join table too.
So in my model I have:
class Type < ActiveRecord::Base
has_and_belongs_to_many :subtypes,
:class_name => ''Type'',
:join_table => ''subtypes_types'',
:association_foreign_key => ''subtype_id'',
:foreign_key => ''type_id''
Then in the form I have this (@subtype carries the detail of the a
parent -- so this form is called by a link "create a new subtype from
this type". NB each type can have many subtypes and belong to many types
to -- hence n...