From 72715ec78e3552afe2b39668cf66b069fea93c6d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 10 Jan 2014 10:30:33 +0000 Subject: [PATCH] cleanup syntax of Relation#all at MembersController#index git-svn-id: http://svn.redmine.org/redmine/trunk@12601 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/members_controller.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index c46b62879..e2f68978a 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -28,12 +28,11 @@ class MembersController < ApplicationController @member_count = @project.member_principals.count @member_pages = Paginator.new @member_count, @limit, params['page'] @offset ||= @member_pages.offset - @members = @project.member_principals.all( - :order => "#{Member.table_name}.id", - :limit => @limit, - :offset => @offset - ) - + @members = @project.member_principals. + order("#{Member.table_name}.id"). + limit(@limit). + offset(@offset). + all respond_to do |format| format.html { head 406 } format.api