Bugs: Browse | Submit New | Admin

[#19960] defining belongs_to with :dependent => :nullify is broken in edge rails > r8675

Date:
2008-05-05 23:43
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
defining belongs_to with :dependent => :nullify is broken in edge rails > r8675

Detailed description
The following changeset ...

http://dev.rubyonrails.org/changeset/8675

breaks line 705 of lib\active_record\connection_adapters\activesalesforce_adapter.rb

belongs_to associations do not support the :nullify option as of that revision.  in fact, discussions indicate that
the :dependent option, while valid, should not be used on belongs_to associations.  see here for a discussion...

http://dev.rubyonrails.org/ticket/10592

a patch is attached.

matte
matte@ruckuswireless.com

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-05-05 23:49
Sender: Matte Edens

okay.  hopefully last comment.  lines need to be concatted for
that patch to work, obviously.  there's only one line that needs
changing.

matte
Date: 2008-05-05 23:48
Sender: Matte Edens

hmm.  and my patch file is missing too.  I'm pasting it here
for posterity.  :)

#### PATCH FILE
--- C:\activesalesforce_adapter.rb	2008-05-05 16:29:08.000000000
-0700
+++ C:\ruby\lib\ruby\gems\1.8\gems\activerecord-activesalesforce-
adapter-2.0.0\lib\active_record\connection_adapters\activesalesfo
rce_adapter.rb	2008-05-05 16:28:22.000000000 -0700
@@ -705 +705 @@
-                klass.belongs_to referenceName.to_sym, :class_name
=> referenced_klass.name, :foreign_key => foreign_key,
:dependent => :nullify
+                klass.belongs_to referenceName.to_sym, :class_name
=> referenced_klass.name, :foreign_key => foreign_key
#### /PATCH FILE
Date: 2008-05-05 23:46
Sender: Matte Edens

oops.  I should have titled it "defining belongs_to with
:dependent => :nullify breaks in edge rails > r8675"

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item