Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dabit opened this issue Mar 28, 2016 · 1 comment
Open

Comments

@dabit
Copy link
Owner

dabit commented Mar 28, 2016

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]

@jaywilburn
Copy link

jaywilburn commented May 29, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants