Displaying 1 result from an estimated 1 matches for "cs_position".
Did you mean:
composition
2007 Nov 30
0
cross sell products - Options_from_collection_select ?
...,
PRIMARY KEY (id)
);
INSERT INTO products VALUES (1, ''alpha'');
INSERT INTO products VALUES (2, ''beta'');
INSERT INTO products VALUES (3, ''gamma'');
CREATE TABLE cross_sells (
product_id INT NOT NULL,
cross_sell_product_id INT NOT NULL,
cs_position INT NOT NULL,
PRIMARY KEY (product_id, cross_sell_product_id),
UNIQUE KEY pos (cs_position)
);
#cross sell beta(2) and gamma(3) on alpha(1)
INSERT INTO cross_sells VALUES (1,2,1);
INSERT INTO cross_sells VALUES (1,3,2);
My product model in product.rb was this
class Product < ActiveRecord...