diff options
author | eileencodes <eileencodes@gmail.com> | 2014-05-11 20:49:14 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2014-05-13 20:56:33 -0400 |
commit | d8ae2764d08ef6474eee978ce03ffb83ab49c6e1 (patch) | |
tree | 210200e749ee1abe336da81c680a55bce0c8e525 /activerecord/lib/active_record/no_touching.rb | |
parent | 522110af700efa0fff203f5bbccb70f06a9e28ee (diff) | |
download | rails-d8ae2764d08ef6474eee978ce03ffb83ab49c6e1.tar.gz rails-d8ae2764d08ef6474eee978ce03ffb83ab49c6e1.tar.bz2 rails-d8ae2764d08ef6474eee978ce03ffb83ab49c6e1.zip |
begin refactoring delete_records method
Refactor by creating two methods delete_all_records and delete_records
to be called by delete_all and delete (or destroy) respectively.
This reduces the number of conditionals required to handle _how_
records get deleted.
The new delete_count method handles how scope is applied to which
delete action.
A delete_all_records method also has to be called in has_many_through
association because of how the methods are chained. This will be
refactored later on.
Diffstat (limited to 'activerecord/lib/active_record/no_touching.rb')
0 files changed, 0 insertions, 0 deletions