Commit Graph

14 Commits

Author SHA1 Message Date
GitLab Bot a66475b6be Add latest changes from gitlab-org/gitlab@master 2020-09-11 21:08:44 +00:00
GitLab Bot 71da5de44f Add latest changes from gitlab-org/gitlab@master 2020-08-05 15:09:59 +00:00
GitLab Bot d5cf5cf4f7 Add latest changes from gitlab-org/gitlab@master 2020-07-17 00:09:37 +00:00
GitLab Bot ff1701e51d Add latest changes from gitlab-org/gitlab@master 2020-07-10 06:09:23 +00:00
GitLab Bot 1f1e53f43f Add latest changes from gitlab-org/gitlab@master 2020-05-28 15:08:02 +00:00
Sean McGivern 79dd92c818 Optimise upload path calls
String#underscore isn't particularly slow, but it's possible for us to
call it many times in a users autocomplete request, with mostly-static
values ('User', 'Group', etc.). We can memoise this and save a
surprising amount of time (around 10% of the total request time in some
cases).
2019-05-14 11:01:48 -05:00
GitLab Release Tools Bot fee6e478d6 Merge branch 'security-approval-race-condition' into 'master'
Add ApplicationRecord#safe_ensure_unique method

See merge request gitlab/gitlabhq!3054
2019-04-25 10:39:09 +00:00
Kamil Trzciński 650f40865e Forbid the use of `#reload` and prefer `#reset`
The `#reload` makes to load all objects into memory,
and the main purpose of `#reload` is to drop the association cache.

The `#reset` seems to solve exactly that case.
2019-04-15 13:05:14 +02:00
Patrick Bajao 208338fde6 Add ApplicationRecord#safe_ensure_unique method
Port of https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/866
to CE excluding the migration and service changes as they don't
apply to CE.
2019-04-12 12:19:47 +08:00
Nick Thomas f086dbf66e
Add a thin encapsulation around .pluck(:id) 2019-03-28 16:18:23 +00:00
Bob Van Landuyt c982edfa19 Avoid race conditions when creating GpgSignature
This avoids race conditions when creating GpgSignature.
2019-02-06 15:24:46 +01:00
Bob Van Landuyt ccd8a9b282 Adds helper for `find_or_create_by` in transaction
This allows us to call `find_or_create_by` on all models and scopes.
2019-02-05 14:44:41 +01:00
Mark Chao d253440ed1 Add query method for id query 2019-01-15 17:10:30 +08:00
Jan Provaznik 648f05622d Add ApplicationRecord model class
In Rails 5 all models by default inherit from ApplicationRecord.
2018-11-14 12:41:16 +01:00