acts_as_shopping_cart
acts_as_shopping_cart copied to clipboard
The migration helper does not add an index to :owner_id and :owner_type
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]
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