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:
@@ -104,7 +104,7 @@ describe "Custom Pages" do
|
||||
|
||||
scenario "Show widget cards for that page" do
|
||||
custom_page = create(:site_customization_page, :published)
|
||||
create(:widget_card, page: custom_page, title: "Card Highlights")
|
||||
create(:widget_card, cardable: custom_page, title: "Card Highlights")
|
||||
|
||||
visit custom_page.url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user