acts_as_shopping_cart icon indicating copy to clipboard operation
acts_as_shopping_cart copied to clipboard

The migration helper does not add an index to :owner_id and :owner_type

Open dabit opened this issue 8 years ago • 1 comments

When you use the migrations helper mentioned on README, it doesn't add an index to the table

create_table :cart_items do |t|
  t.shopping_cart_item_fields # Creates the cart items fields
end

This helper should also trigger add_index :cart_items, [:owner_id, :owner_type]

dabit avatar Mar 28 '16 06:03 dabit

I'm getting this error: ActiveModel::MissingAttributeError at /order_items can't write unknown attribute price_cents

Would this be the cause of that?

Rails 5.0.3 Ruby 2.4.1

jaywilburn avatar May 29 '17 01:05 jaywilburn