diff --git a/app/models/proposition.rb b/app/models/proposition.rb index c3ab063..0fd16f2 100644 --- a/app/models/proposition.rb +++ b/app/models/proposition.rb @@ -1,6 +1,6 @@ class Proposition < ActiveRecord::Base belongs_to :proposer, class_name: 'User' - belongs_to :proposable, polymorphic: true + belongs_to :proposable, polymorphic: true, dependent: :destroy enum status: [:undecided, :approved, :rejected, :backup] delegate :proposable_title, :proposable_type, :proposable_description, to: :proposable