docbrown/spec
Jeremy Friesen ee0a521a83
Favoring delete_all on user relationships (#15443)
* Favoring delete_all on user relationships

Prior to this commit, several of the user's "has_many" were marked as
`depenedent: :destroy`.

In the case of :destroy, ActiveRecord instantiates each object and then
runs destroy. Whereas in the case of :delete, ActiveRecord issues a SQL
command to delete the related files.

It is often "safer" to use :destroy, as it guarantees that you'll
instantiate the record and run it's callbacks. But sometimes you have
to go with the speed of SQL.

And while not directly related to #15424 it is representative of our
callback ecosystem creating some unexpected computational loads.

Related to #15442 and #15424

* Noting models that user no longer cascade destroys
2021-11-23 11:50:12 -05:00
..
black_box Remove <provider>_created_at columns (#13264) 2021-04-29 10:24:16 -05:00
components/admin/users Refactor Admin Member Detail view - Tools section (#14283) 2021-08-17 18:55:53 +02:00
controllers/concerns 15 minute fix: Add default argument to JsonApiSortParam (#13369) 2021-04-14 10:32:07 +07:00
decorators Theming cleanup (#15237) 2021-11-09 10:11:55 -05:00
factories ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
fixtures Remove duplicated work display from header / profile work (#14210) 2021-07-30 12:28:40 +02:00
generator Add service generator (#11265) 2020-11-10 09:09:35 +07:00
helpers Remove unused assets (#15367) 2021-11-16 19:57:37 +01:00
initializers ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
lib ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
liquid_tags complete changes (#15420) 2021-11-18 14:19:45 -05:00
mailers ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
models Favoring delete_all on user relationships (#15443) 2021-11-23 11:50:12 -05:00
policies ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
queries Adds validations to avoid creating unnecessary PNs (#14621) 2021-08-31 15:00:30 -06:00
refinements Update data exporter to handle admin send (#10274) 2020-10-26 18:00:56 -04:00
requests Updating valid domain registration (#15436) 2021-11-19 10:05:00 -05:00
routing ✂✂✂ Remove shop_url from SiteConfig ✂✂✂ (#13773) 2021-05-18 09:03:05 +07:00
serializers/search ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
services Use tap instead of a temporary variable to modify after create (#15453) 2021-11-22 16:06:11 -06:00
support ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
system reflect search query in page title (#15434) 2021-11-22 13:32:28 +00:00
tasks Create Default Nav Links In New Forem (RFC #237) (#14345) 2021-08-02 12:52:36 -04:00
uploaders ✂✂✂ Remove events (#15062) 2021-10-15 09:31:08 -04:00
validators Updating valid domain registration (#15436) 2021-11-19 10:05:00 -05:00
view_objects [15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767) 2021-05-19 15:03:20 +02:00
views Let users purchase credits (#15346) 2021-11-10 15:18:52 -06:00
workers Guarding against missing experiments (#15440) 2021-11-22 16:06:32 -05:00
i18n_spec.rb Misc i18n fixes (#14852) 2021-10-05 13:22:33 +02:00
rails_helper.rb Add feature flag for Connect (#14644) 2021-09-13 10:45:56 -04:00
spec_helper.rb Theme data update script, remove theme choices from UI (#15225) 2021-11-08 08:38:43 -05:00