search for: batch_id

Displaying 1 result from an estimated 1 matches for "batch_id".

Did you mean: patch_id
2006 Jan 13
0
Form element that is not an AR object attribute
...name varchar(255), primary key (id)); create table batches (id int not null auto_increment, product_id int not null, quantity int not null, price decimal(10,2) not null, primary key (id), foreign key (product_id) references products(id)); create table serial_numbers (id int not null auto_increment, batch_id int not null, sn varchar(255), status char(1), primary key (id), foreign key (batch_id) references batches(id)); app/models ----------------- class Batch < ActiveRecord::Base belongs_to :product has_many :serial_numbers end class SerialNumber < ActiveRecord::Base belongs_to :batch end...