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:
@@ -271,7 +271,7 @@ resolve "Audit" do |audit|
|
||||
end
|
||||
|
||||
resolve "Widget::Card" do |card, options|
|
||||
[*resource_hierarchy_for(card.page), card]
|
||||
[*resource_hierarchy_for(card.cardable), card]
|
||||
end
|
||||
|
||||
resolve "Budget::Group" do |group, options|
|
||||
|
||||
Reference in New Issue
Block a user