aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/model_schema.rb
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2014-05-11 20:49:14 -0400
committereileencodes <eileencodes@gmail.com>2014-05-13 20:56:33 -0400
commitd8ae2764d08ef6474eee978ce03ffb83ab49c6e1 (patch)
tree210200e749ee1abe336da81c680a55bce0c8e525 /activerecord/lib/active_record/model_schema.rb
parent522110af700efa0fff203f5bbccb70f06a9e28ee (diff)
downloadrails-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/model_schema.rb')
0 files changed, 0 insertions, 0 deletions