summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-05-16 17:31:48 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2018-05-16 17:31:48 +0000
commitf3d60d7e733eb67b3d41581eee513719cf51cc31 (patch)
tree8baf15c14f70636c6a646ae157116a2fb30d78eb /app/helpers
parent9e41ed61ea70532578416e01c228ff7a81abc192 (diff)
parente38938b332ca751dfc5e784f242d620016e8ca43 (diff)
downloadgitlab-ce-f3d60d7e733eb67b3d41581eee513719cf51cc31.tar.gz
Merge branch 'sh-fast-admin-counts' into 'master'
Fix Error 500 viewing admin page due to statement timeouts Closes #46255 See merge request gitlab-org/gitlab-ce!18982
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/count_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/count_helper.rb b/app/helpers/count_helper.rb
new file mode 100644
index 00000000000..24ee62e68ba
--- /dev/null
+++ b/app/helpers/count_helper.rb
@@ -0,0 +1,5 @@
+module CountHelper
+ def approximate_count_with_delimiters(model)
+ number_with_delimiter(Gitlab::Database::Count.approximate_count(model))
+ end
+end