This project is archived and is in readonly mode.
Polymorphic Associations & STI don't record the correct model type
-
Pratik
- State changed from new to incomplete
- Assigned user set to Pratik
The patch is missing tests.
Thanks.
-
Trek
This is an oldie, but I run across it as a problem from time to time. Patch with included test applies to 2.3.x for belongs_to assocations.
-
Conrad Taylor
I'm currently using Rails 2.3.8 and the resource_type on the STI/Polymorphic table isn't being set. BTW, I have the following construction:
D belongs_to :resource, :polymorphic => true
A has_many :groups, :as => :resource, :dependent => :destroy
B has_many :groups, :as => :resource, :dependent => :destroy
C has_many :groups, :as => :resource, :dependent => :destroyNote: The D model is both polymorphic and the STI bass class.
Anyway, I'm wondering, if I'm missing a step somewhere and/or this patch hasn't been applied to the 2.3.8?
-
tvongaza
I've updated Trek's patch to apply to v2.3.11. All AR tests still pass.
