Displaying 1 result from an estimated 1 matches for "claim_id".
Did you mean:
chain_id
2006 Feb 23
3
has_many reference
...ActiveRecord::Base
has_many :endorsees
end
class Endorsees < ActiveRecord:: Base
belongs_to :draft
end
>From my reading, methinks I should be able to say:
d = Draft.new
d.endorsees << Endorsee.new
SQL (for mysql) is:
create table drafts (
id int not null auto_increment,
claim_id int not null,
primary key(id)
);
create table endorsees (
id int not null auto_increment,
draft_id int not null,
constraint fk_endorsee_drafts
foreign key (draft_id) references drafts(id),
primary key(id)
) ;
I get the following error. The top stack point which references
my code...