Displaying 2 results from an estimated 2 matches for "voice_typ".
Did you mean:
voice_type
2006 Feb 07
0
newbie -- displaying foreign key
...har( 100 ) not null,
member_type_id integer not null,
primary key( id ),
constraint fk_m_member_type foreign key( member_type_id ) \
references member_types( id )
);
And in the model:
class Member < ActiveRecord::Base
belongs_to :voice_type
# validation stuff removed
end
My question is that I want to add a new member, with the member_types as
a select list. Obviously, when I add the member to the database, I will
want to add the id, rather than the actual member_type.
In app/views/admin/new.rhtml, I have this (snippet fr...
2006 Feb 07
1
displaying foreign keys help request
...har( 100 ) not null,
member_type_id integer not null,
primary key( id ),
constraint fk_m_member_type foreign key( member_type_id ) \
references member_types( id )
);
And in the model:
class Member < ActiveRecord::Base
belongs_to :voice_type
# validation stuff removed
end
My question is that I want to add a new member, with the member_types as
a select list. Obviously, when I add the member to the database, I will
want to add the id, rather than the actual member_type.
In app/views/admin/new.rhtml, I have this (snippet fr...