diff options
Diffstat (limited to 'app/controllers/explore/projects_controller.rb')
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index 42795e418a4..7a485eebfe3 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -8,6 +8,8 @@ class Explore::ProjectsController < Explore::ApplicationController include SortingHelper include SortingPreference + MIN_SEARCH_LENGTH = 3 + before_action :set_non_archived_param before_action :set_sorting @@ -72,7 +74,7 @@ class Explore::ProjectsController < Explore::ApplicationController def load_projects load_project_counts - projects = ProjectsFinder.new(current_user: current_user, params: params).execute + projects = ProjectsFinder.new(current_user: current_user, params: params.merge(minimum_search_length: MIN_SEARCH_LENGTH)).execute projects = preload_associations(projects) projects = projects.page(params[:page]).without_count |