modify destroy project and user can't destroy biding_project
This commit is contained in:
parent
8c675c2a96
commit
0238001721
|
@ -51,6 +51,9 @@ class Project < ActiveRecord::Base
|
||||||
has_one :repository, :conditions => ["is_default = ?", true]
|
has_one :repository, :conditions => ["is_default = ?", true]
|
||||||
has_many :repositories, :dependent => :destroy
|
has_many :repositories, :dependent => :destroy
|
||||||
has_many :changesets, :through => :repository
|
has_many :changesets, :through => :repository
|
||||||
|
#added by xianbo for delete biding_project
|
||||||
|
has_many :biding_projects, :dependent => :destroy
|
||||||
|
#ended by xianbo
|
||||||
# added by fq
|
# added by fq
|
||||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||||
has_many :homework_for_courses, :dependent => :destroy
|
has_many :homework_for_courses, :dependent => :destroy
|
||||||
|
|
|
@ -75,7 +75,9 @@ class User < Principal
|
||||||
has_one :rss_token, :class_name => 'Token', :conditions => "action='feeds'"
|
has_one :rss_token, :class_name => 'Token', :conditions => "action='feeds'"
|
||||||
has_one :api_token, :class_name => 'Token', :conditions => "action='api'"
|
has_one :api_token, :class_name => 'Token', :conditions => "action='api'"
|
||||||
belongs_to :auth_source
|
belongs_to :auth_source
|
||||||
|
## added by xianbo for delete
|
||||||
|
has_many :biding_projects, :dependent => :destroy
|
||||||
|
##ended by xianbo
|
||||||
|
|
||||||
#####fq
|
#####fq
|
||||||
has_many :jours, :class_name => 'JournalsForMessage', :dependent => :destroy
|
has_many :jours, :class_name => 'JournalsForMessage', :dependent => :destroy
|
||||||
|
|
Loading…
Reference in New Issue