diff options
author | Dimitri Krassovski <labria@startika.com> | 2009-03-06 19:11:13 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-06 19:11:13 +0000 |
commit | 984bc7a614852944808739fae09a654b6e62872e (patch) | |
tree | e5eede0f31d0b9cd8708c506fe81c12fe3f195df /activerecord/test/models/company.rb | |
parent | 4863634a157a8e4a0033734617253b42325daf34 (diff) | |
download | rails-984bc7a614852944808739fae09a654b6e62872e.tar.gz rails-984bc7a614852944808739fae09a654b6e62872e.tar.bz2 rails-984bc7a614852944808739fae09a654b6e62872e.zip |
Ensure replacing has_one associations respects the supplied :dependent option. [#1305 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/models/company.rb')
-rw-r--r-- | activerecord/test/models/company.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 3b27a9e272..a47992a8e7 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -69,6 +69,7 @@ class Firm < Company has_one :account_with_select, :foreign_key => "firm_id", :select => "id, firm_id", :class_name=>'Account' has_one :readonly_account, :foreign_key => "firm_id", :class_name => "Account", :readonly => true has_one :account_using_primary_key, :primary_key => "firm_id", :class_name => "Account" + has_one :deletable_account, :foreign_key => "firm_id", :class_name => "Account", :dependent => :delete end class DependentFirm < Company |