From d4ebbe5ba8c822bf320122add151fcc5a9c07cd7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 11 Dec 2014 17:58:08 +0000 Subject: Adds some helpers tests. git-svn-id: http://svn.redmine.org/redmine/trunk@13735 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/members_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/helpers/members_helper.rb') diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 9036c6db0..7a38513e1 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -18,10 +18,10 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. module MembersHelper - def render_principals_for_new_members(project) + def render_principals_for_new_members(project, limit=100) scope = Principal.active.visible.sorted.not_member_of(project).like(params[:q]) principal_count = scope.count - principal_pages = Redmine::Pagination::Paginator.new principal_count, 100, params['page'] + principal_pages = Redmine::Pagination::Paginator.new principal_count, limit, params['page'] principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).to_a s = content_tag('div', -- cgit v1.2.3