aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorCody Cutrer <cody@cutrer.us>2015-03-24 09:09:46 -0600
committerCody Cutrer <cody@cutrer.us>2015-03-24 09:22:46 -0600
commit7be08818a96da956695621880c1bc9d4bb1c9d7f (patch)
tree845058e0d0b5c11f7a011886eb0856d090ed2899 /railties/test
parentbfd5bf8313e6ea0bb2eccb68ee5076bb63f0b2db (diff)
downloadrails-7be08818a96da956695621880c1bc9d4bb1c9d7f.tar.gz
rails-7be08818a96da956695621880c1bc9d4bb1c9d7f.tar.bz2
rails-7be08818a96da956695621880c1bc9d4bb1c9d7f.zip
DRY up STI subclass logic
the newer method used for discriminating new records did not use the older and more robust method used for instantiating existing records, but did have a better post-check to ensure the sublass was in the hierarchy. so move the descendants check to find_sti_class, and then simply call find_sti_class from subclass_from_attributes
Diffstat (limited to 'railties/test')
0 files changed, 0 insertions, 0 deletions