Answer the question
In order to leave comments, you need to log in
How to extend the has_and_belongs_to_many and has_many associations to refer to a single model object?
There is spray_products. Some of the spree_products may belong to other spree_products.
I created a table spree_product_childrens:
create_table :spree_product_childrens, id: false do |t|
t.integer :product_id, null: false
t.integer :children_id, null: false
t.boolean :by_default, default: false
t.boolean :necessarily, default: false
t.boolean :in_set, default: false
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question