Skip to content

Instantly share code, notes, and snippets.

@berellevy
Created August 19, 2020 03:01
Show Gist options
  • Save berellevy/dcb0bd97509a73facdbe9dfc85af9fca to your computer and use it in GitHub Desktop.
Save berellevy/dcb0bd97509a73facdbe9dfc85af9fca to your computer and use it in GitHub Desktop.
class AddItemableToCartItems < ActiveRecord::Migration[6.0]
def change
add_reference :cart_items, :itemable, polymorphic: true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment