Add constant for results limit

This commit is contained in:
aignatov-bio 2020-07-17 11:12:39 +02:00
parent 7c4bfad09b
commit 6ceb4abfb5
2 changed files with 3 additions and 1 deletions

View file

@ -35,7 +35,7 @@ module MyModulesHelper
def ordered_result_of(my_module, page)
page ||= 1
my_module.results.where(archived: false).page(page).per(10).order(created_at: :desc)
my_module.results.where(archived: false).page(page).per(Constants::RESULTS_SEARCH_LIMIT).order(created_at: :desc)
end
def get_task_alert_color(my_module)

View file

@ -64,6 +64,8 @@ class Constants
ATWHO_SEARCH_LIMIT = 5
# Max characters for repository name in Atwho modal
ATWHO_REP_NAME_LIMIT = 16
# Results limited query/display elements for pages
RESULTS_SEARCH_LIMIT = 10
#=============================================================================
# File and data memory size