Make widget cards polymorphic
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.
This commit is contained in:
@@ -172,7 +172,7 @@ describe "Polymorphic routes" do
|
||||
|
||||
it "routes site customization page widget cards" do
|
||||
page = create(:site_customization_page)
|
||||
card = create(:widget_card, page: page)
|
||||
card = create(:widget_card, cardable: page)
|
||||
|
||||
expect(admin_polymorphic_path(card)).to eq admin_site_customization_page_widget_card_path(page, card)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user