diff options
author | Cody Cutrer <cody@cutrer.us> | 2015-03-24 09:09:46 -0600 |
---|---|---|
committer | Cody Cutrer <cody@cutrer.us> | 2015-03-24 12:23:00 -0600 |
commit | 7c0f8c64fa1e8e055e2077255843f149e600024b (patch) | |
tree | f903ef2d256be508349a00b6e2ffb88c5666e4a1 /activerecord/test/active_record/connection_adapters | |
parent | d024bad4d1f8307a66fd6684dc658fddee37147e (diff) | |
download | rails-7c0f8c64fa1e8e055e2077255843f149e600024b.tar.gz rails-7c0f8c64fa1e8e055e2077255843f149e600024b.tar.bz2 rails-7c0f8c64fa1e8e055e2077255843f149e600024b.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
now with fixed specs
Diffstat (limited to 'activerecord/test/active_record/connection_adapters')
0 files changed, 0 insertions, 0 deletions