diff options
| author | Cody Cutrer <cody@cutrer.us> | 2015-03-24 09:09:46 -0600 |
|---|---|---|
| committer | Cody Cutrer <cody@cutrer.us> | 2015-03-24 09:22:46 -0600 |
| commit | 7be08818a96da956695621880c1bc9d4bb1c9d7f (patch) | |
| tree | 845058e0d0b5c11f7a011886eb0856d090ed2899 /activemodel/lib/active_model/validations/callbacks.rb | |
| parent | bfd5bf8313e6ea0bb2eccb68ee5076bb63f0b2db (diff) | |
| download | rails-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 'activemodel/lib/active_model/validations/callbacks.rb')
0 files changed, 0 insertions, 0 deletions
