class ProjectsController < ApplicationController def search query_params = { keyword: params[:keyword], category: 'manage' } projects = Users::ProjectService.new(current_user, query_params).call params[:limit] = params[:per_page].to_i.zero? ? 20 : params[:per_page].to_i @count = projects.count @projects = paginate projects end end