diff --git a/app/models/project.rb b/app/models/project.rb index 5cf53cc8..e85d5007 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -51,6 +51,9 @@ class Project < ActiveRecord::Base has_one :repository, :conditions => ["is_default = ?", true] has_many :repositories, :dependent => :destroy has_many :changesets, :through => :repository + #added by xianbo for delete biding_project + has_many :biding_projects, :dependent => :destroy + #ended by xianbo # added by fq has_many :journals_for_messages, :as => :jour, :dependent => :destroy has_many :homework_for_courses, :dependent => :destroy diff --git a/app/models/user.rb b/app/models/user.rb index 1bce9805..2d6b5908 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -75,7 +75,9 @@ class User < Principal has_one :rss_token, :class_name => 'Token', :conditions => "action='feeds'" has_one :api_token, :class_name => 'Token', :conditions => "action='api'" belongs_to :auth_source - +## added by xianbo for delete + has_many :biding_projects, :dependent => :destroy +##ended by xianbo #####fq has_many :jours, :class_name => 'JournalsForMessage', :dependent => :destroy