From 2c689b639989ddba9057bcba5f12ab4abc8b2dbc Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 31 Jul 2014 14:02:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=AB=9E=E8=B5=9B=E6=97=B6?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=AB=9E=E8=B5=9B=E4=B8=8B=E6=89=80=E6=9C=89?= =?UTF-8?q?=E4=BD=9C=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/contest.rb | 2 +- app/models/contesting_softapplication.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/contest.rb b/app/models/contest.rb index e1706b166..f1503f593 100644 --- a/app/models/contest.rb +++ b/app/models/contest.rb @@ -6,7 +6,7 @@ class Contest < ActiveRecord::Base has_many :contesting_projects, :dependent => :destroy has_many :projects, :through => :contesting_projects has_many :contesting_softapplications, :dependent => :destroy - has_many :softapplications, :through => :contesting_softapplications + has_many :softapplications, :through => :contesting_softapplications, :dependent => :destroy has_many :projects_member, :class_name => 'User', :through => :projects has_many :journals_for_messages, :as => :jour, :dependent => :destroy has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy diff --git a/app/models/contesting_softapplication.rb b/app/models/contesting_softapplication.rb index f880818d9..f91c16f69 100644 --- a/app/models/contesting_softapplication.rb +++ b/app/models/contesting_softapplication.rb @@ -3,7 +3,7 @@ class ContestingSoftapplication < ActiveRecord::Base attr_accessible :contest_id, :description, :softapplication_id, :user_id belongs_to :contest - belongs_to :softapplication + belongs_to :softapplication, :dependent => :destroy belongs_to :user