diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-11 17:58:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-11 17:58:08 +0000 |
commit | d4ebbe5ba8c822bf320122add151fcc5a9c07cd7 (patch) | |
tree | 9fb8d756263fddddf01d350a6c6358d3721a70ee /app/helpers/members_helper.rb | |
parent | fcf9cf7bb17e5760f9cd4c93e481dcf41bac8b86 (diff) | |
download | redmine-d4ebbe5ba8c822bf320122add151fcc5a9c07cd7.tar.gz redmine-d4ebbe5ba8c822bf320122add151fcc5a9c07cd7.zip |
Adds some helpers tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@13735 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/members_helper.rb')
-rw-r--r-- | app/helpers/members_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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', |