Displaying 1 result from an estimated 1 matches for "bags_packages".
2006 Mar 09
4
habtm questions
...`bags` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '''',
PRIMARY KEY (`id`)
CREATE TABLE `packages` (
`id` int(255) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '''',
PRIMARY KEY (`id`)
CREATE TABLE `bags_packages` (
`id` int(11) NOT NULL auto_increment,
`bag_id` int(11) NOT NULL default ''0'',
`package_id` int(11) NOT NULL default ''0'',
PRIMARY KEY (`id`)
class Package < ActiveRecord::Base
has_and_belongs_to_many :bags
end
do I need this below? the HABTM tutor...