So now we'll be able to add them to other sections. We're also adding a `dependent: :destroy` relation to models having cards since it doesn't make sense to have cards around when their page has been destroyed.
9 lines
250 B
Ruby
9 lines
250 B
Ruby
class MakeCardsPolymorphic < ActiveRecord::Migration[5.2]
|
|
def change
|
|
change_table :widget_cards do |t|
|
|
t.rename :site_customization_page_id, :cardable_id
|
|
t.string :cardable_type, default: "SiteCustomization::Page"
|
|
end
|
|
end
|
|
end
|